homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author renatolfc
Recipients docs@python, renatolfc
Date 2010年06月16日.19:58:47
SpamBayes Score 0.010514595
Marked as misclassified No
Message-id <1276718330.85.0.16685449654.issue9014@psf.upfronthosting.co.za>
In-reply-to
Content
PyObject_HEAD's documentation in py3k (http://docs.python.org/dev/py3k/c-api/structures.html#PyObject_HEAD) uses the same content used in the python 2.x's docs which is wrong, as there were some API changes.
PyObject_HEAD is actually defined as
#define PyObject_HEAD PyObject ob_base;
with PyObject defined as
typedef struct _object {
 _PyObject_HEAD_EXTRA
 Py_ssize_t ob_refcnt;
 struct _typeobject *ob_type;
} PyObject;
(The PyTRACE_REFS discussion is still valid, though.)
Additionally, it'd be nice to mention that the Py_REFCNT(ob) and Py_TYPE(ob) macros should be used to access the PyObject members.
History
Date User Action Args
2010年06月16日 19:58:50renatolfcsetrecipients: + renatolfc, docs@python
2010年06月16日 19:58:50renatolfcsetmessageid: <1276718330.85.0.16685449654.issue9014@psf.upfronthosting.co.za>
2010年06月16日 19:58:48renatolfclinkissue9014 messages
2010年06月16日 19:58:47renatolfccreate

AltStyle によって変換されたページ (->オリジナル) /