summaryrefslogtreecommitdiff
path: root/Modules/xxsubtype.c
Commit message (Collapse)AuthorAgeFilesLines
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-197/+197
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-4/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* remove forward declarations. No constructors to move for these files. MakesAnthony Baxter2006-04-121-4/+0
| | | | code work with C++ compilers.
* add some example docstrings using PyDoc_STRSkip Montanaro2002-08-141-8/+8
|
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* staticforward bites the dust.Jeremy Hylton2002-07-171-2/+2
| | | | | | | | | | | | | | | The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-2/+2
|
* Add a simple test of the METH_CLASS and METH_STATIC flags for type methods.Fred Drake2002-03-281-0/+28
|
* Change the example code to prefer PyModule_Add*() instead of using theFred Drake2002-03-121-9/+5
| | | | | module dictionary directly. Also, be more careful about not re-initializing globals in the event of re-initialization of a C extension.
* initxxsubtype(): Add a comment to make the magic clearer; I doubt it'sTim Peters2001-12-171-2/+4
| | | | obvious to anyone except PyType_Ready's author <0.9 wink>.
* Use PyType_Ready() for initialization of the ob_type field of ourGuido van Rossum2001-12-171-2/+4
| | | | types (the tp_base field must be initialized prior to that call).
* David Abrahams tried to compile this as a separate DLL under MSVC, andTim Peters2001-12-171-4/+21
| | | | | | | | | | | | | got a barrage of compile errors that didn't make sense to the C++ brain: MSVC does not allow C (but does allow C++) initializers to contain data addresses supplied by other DLLs. So changed the initializers here to use dummy nulls, and changed module init to plug in the foreign addresses at runtime (manually simulating what C++ does by magic). Tested on Windows, and Guido tested on Linux (thanks!). BTW, the *point* is that people are going to use this module as a template for writing their own subtypes, and it's unusual for extension authors to build their extensions into Python directly (separate DLLs are the norm on Windows); so it's better if we give them a template that works <wink>.
* Give xxsubtype a module docstring, so its oddball purpose is discoverableTim Peters2001-12-101-2/+8
| | | | | from a prompt without searching the source code (there was an SF bug report about this, already closed ... "479568 xxsubtype builtin").
* Adding missing "static" declarations (found by "make smelly").Neil Schemenauer2001-10-211-1/+1
|
* Add optional docstrings to getset descriptors. Fortunately, there'sGuido van Rossum2001-09-201-2/+3
| | | | | | | | | | no backwards compatibility to worry about, so I just pushed the 'closure' struct member to the back -- it's never used in the current code base (I may eliminate it, but that's more work because the getter and setter signatures would have to change.) As examples, I added actual docstrings to the getset attributes of a few types: file.closed, xxsubtype.spamdict.state.
* Add optional docstrings to member descriptors. For backwardsGuido van Rossum2001-09-201-2/+3
| | | | | | | | | | | | | | | compatibility, this required all places where an array of "struct memberlist" structures was declared that is referenced from a type's tp_members slot to change the type of the structure to PyMemberDef; "struct memberlist" is now only used by old code that still calls PyMember_Get/Set. The code in PyObject_GenericGetAttr/SetAttr now calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef argument. As examples, I added actual docstrings to the attributes of a few types: file, complex, instance method, super, and xxsubtype.spamlist. Also converted the symtable to new style getattr.
* Change the type names to xxsublist.<name>.Guido van Rossum2001-08-161-2/+2
|
* Add 'state' as a get/set attribute to spamlist. This serves as anGuido van Rossum2001-08-151-1/+12
| | | | example.
* Add 'state' as a read-only attribute to spamdict. This serves as anGuido van Rossum2001-08-151-1/+7
| | | | example.
* - Rename PyType_InitDict() to PyType_Ready().Guido van Rossum2001-08-071-2/+2
| | | | | | - Add an explicit call to PyType_Ready(&PyList_Type) to pythonrun.c (just for the heck of it, really -- we should either explicitly ready all types, or none).
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-0/+233