Change spelling of the macros, as per request in #1629.

This commit is contained in:
Martin v. Löwis 2007-12-19 08:08:00 +00:00
parent f2126d0591
commit 768bd875d4
1 changed files with 5 additions and 5 deletions

View File

@ -108,9 +108,9 @@ PyObject* (unless the pointer is already known to have that type), and
SHOULD use the respective accessor macros. To simplify access to
ob_type, ob_refcnt, and ob_size, macros::
#define Py_Type(o) (((PyObject*)(o))->ob_type)
#define Py_Refcnt(o) (((PyObject*)(o))->ob_refcnt)
#define Py_Size(o) (((PyVarObject*)(o))->ob_size)
#define Py_TYPE(o) (((PyObject*)(o))->ob_type)
#define Py_REFCNT(o) (((PyObject*)(o))->ob_refcnt)
#define Py_SIZE(o) (((PyVarObject*)(o))->ob_size)
are added. E.g. the code blocks ::
@ -120,9 +120,9 @@ are added. E.g. the code blocks ::
needs to be changed to::
#define PyList_CheckExact(op) (Py_Type(op) == &PyList_Type)
#define PyList_CheckExact(op) (Py_TYPE(op) == &PyList_Type)
return Py_Type(func)->tp_name;
return Py_TYPE(func)->tp_name;
For initialization of type objects, the current sequence ::