<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects/moduleobject.c, branch v2.5a2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/moduleobject.c?h=v2.5a2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/moduleobject.c?h=v2.5a2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2006-04-15T21:47:09Z</updated>
<entry>
<title>Use Py_VISIT in all tp_traverse methods, instead of traversing manually or</title>
<updated>2006-04-15T21:47:09Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2006-04-15T21:47:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c6e55068cad6f2178981eec4f0a0a583b8bba21a'/>
<id>urn:sha1:c6e55068cad6f2178981eec4f0a0a583b8bba21a</id>
<content type='text'>
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
</content>
</entry>
<entry>
<title>Revert backwards-incompatible const changes.</title>
<updated>2006-02-27T16:46:16Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-02-27T16:46:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=15e62742fad688b026ba80bf17d1345c4cbd423b'/>
<id>urn:sha1:15e62742fad688b026ba80bf17d1345c4cbd423b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge ssize_t branch.</title>
<updated>2006-02-15T17:27:45Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-02-15T17:27:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=18e165558b24d29e7e0ca501842b9236589b012a'/>
<id>urn:sha1:18e165558b24d29e7e0ca501842b9236589b012a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add const to several API functions that take char *.</title>
<updated>2005-12-10T18:50:16Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2005-12-10T18:50:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=af68c874a6803b4e90b616077a602c0593719a1d'/>
<id>urn:sha1:af68c874a6803b4e90b616077a602c0593719a1d</id>
<content type='text'>
In C++, it's an error to pass a string literal to a char* function
without a const_cast().  Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.

I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc.  Predictably, there were a large set of functions that
needed to be fixed as a result of these changes.  The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].

One cast was required as a result of the changes:  A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
</content>
</entry>
<entry>
<title>Make the word "module" appear in the error string for calling the</title>
<updated>2004-09-14T17:19:09Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2004-09-14T17:19:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1fd00a1b7185a6bfb575e3ca0303e5fdc9d24498'/>
<id>urn:sha1:1fd00a1b7185a6bfb575e3ca0303e5fdc9d24498</id>
<content type='text'>
module type with silly arguments.  (The exact name can be quibbled
over, if you care).

This was partially inspired by bug #1014215 and so on, but is also
just a good idea.
</content>
</entry>
<entry>
<title>Remove code that tried to warn about shadowing builtin names after a</title>
<updated>2003-07-16T22:04:11Z</updated>
<author>
<name>Neil Schemenauer</name>
<email>nascheme@enme.ucalgary.ca</email>
</author>
<published>2003-07-16T22:04:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7555294576a642aac7359c51d9b806d17d17a678'/>
<id>urn:sha1:7555294576a642aac7359c51d9b806d17d17a678</id>
<content type='text'>
module had been compiled.  It gives too many spurious warnings.
</content>
</entry>
<entry>
<title>Warn about creating global variables by __setattr__ that shadow builtin</title>
<updated>2003-06-09T18:42:19Z</updated>
<author>
<name>Neil Schemenauer</name>
<email>nascheme@enme.ucalgary.ca</email>
</author>
<published>2003-06-09T18:42:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4e3363e884062e1ad6002fc8cc85201a2dea43d7'/>
<id>urn:sha1:4e3363e884062e1ad6002fc8cc85201a2dea43d7</id>
<content type='text'>
names.  Unfortunately, this is not bulletproof since the module
dictionary can be modified directly.
</content>
</entry>
<entry>
<title>Patch #568124: Add doc string macros.</title>
<updated>2002-06-13T20:33:02Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2002-06-13T20:33:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f'/>
<id>urn:sha1:14f8b4cfcb98de74b9c6e9316539be9e2a5cd31f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add a docstring to the module type.</title>
<updated>2002-06-04T06:02:35Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-04T06:02:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ed3e09f28915eb382d8fdcab6734c382fd3f393c'/>
<id>urn:sha1:ed3e09f28915eb382d8fdcab6734c382fd3f393c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Surprising fix for SF bug 563060: module can be used as base class.</title>
<updated>2002-06-04T05:52:47Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2002-06-04T05:52:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c3a787e090dce76149ae86d70d4fecea3c285a40'/>
<id>urn:sha1:c3a787e090dce76149ae86d70d4fecea3c285a40</id>
<content type='text'>
Change the module constructor (module_init) to have the signature
__init__(name:str, doc=None); this prevents the call from type_new()
to succeed.  While we're at it, prevent repeated calling of
module_init for the same module from leaking the dict, changing the
semantics so that __dict__ is only initialized if NULL.

Also adding a unittest, test_module.py.

This is an incompatibility with 2.2, if anybody was instantiating the
module class before, their argument list was probably empty; so this
can't be backported to 2.2.x.
</content>
</entry>
</feed>
