summaryrefslogtreecommitdiffstats
path: root/Doc/ext/noddy2.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug in implementation of tp_init function. It should be an intJim Fulton2003-06-281-4/+3
| | | | function, not a PyObject *.
* Fix ref counts in initialization code.Raymond Hettinger2003-05-251-0/+1
|
* Added some missing PyObject* casts in the deallocators.Jim Fulton2003-05-161-1/+4
| | | | | | | Added some defines for PyMODINIT_FUNC so that the examples work with Python 2.2. I think I'm done hacking this documentation. Yippie! :)
* Rewrote the basic section of the chapter on defining new types.Jim Fulton2003-05-071-0/+185
Changed the example to show how to create types the new way: - Use a class new method rather than a new function. - Use self->ob_type->tp_free in deallocators - Use attribute descriptors rather than set/getattr methods. - Make the type usable as a base type. I split the example into 3 parts: 1. The minimal new type 2. Adding attributes and methods. 3. Finer control over attributes. It's much simpler to define builtin types. These updates hopefully show this. I also made minor wording changes in two other places. I still need to update xxobject.c