diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-02-02 21:29:40 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-02-02 21:29:40 (GMT) |
commit | 9f9892648f954e45a628113febb524261075db32 (patch) | |
tree | 9a9e70a2318e67812787794ea9ab91f59b16b37a /Doc/extending | |
parent | 7f42395b6d78a7c8e6b2ef2623c181aa93084269 (diff) | |
download | cpython-9f9892648f954e45a628113febb524261075db32.zip cpython-9f9892648f954e45a628113febb524261075db32.tar.gz cpython-9f9892648f954e45a628113febb524261075db32.tar.bz2 |
Issue #1717, continued: Doc fixes and other cleanup related
to renaming of tp_compare.
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/newtypes.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 1484c79..a0a797a 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -80,7 +80,7 @@ Moving on, we come to the crunch --- the type object. :: 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ - 0, /* tp_compare */ + 0, /* tp_reserved */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ @@ -1484,10 +1484,10 @@ provide. They are in :file:`object.h` in the Python include directory that comes with the source distribution of Python. In order to learn how to implement any specific method for your new data type, -do the following: Download and unpack the Python source distribution. Go the -:file:`Objects` directory, then search the C source files for ``tp_`` plus the -function you want (for example, ``tp_compare``). You will find examples of the -function you want to implement. +do the following: Download and unpack the Python source distribution. Go to +the :file:`Objects` directory, then search the C source files for ``tp_`` plus +the function you want (for example, ``tp_richcompare``). You will find examples +of the function you want to implement. When you need to verify that an object is an instance of the type you are implementing, use the :cfunc:`PyObject_TypeCheck` function. A sample of its use |