[docs] [issue23710] C API doc for PyObject_HEAD is outdated

Tomi Pieviläinen report at bugs.python.org
Thu Mar 19 15:41:39 CET 2015

New submission from Tomi Pieviläinen:

https://docs.python.org/3/c-api/structures.html#c.PyObject_HEAD says that the macro should be used for creating new types and that it has ob_type. Unfortunately at some point (@61466 perhaps) that definition in object.h was changed. This affects other pages too (at least https://docs.python.org/3/extending/newtypes.html).

I encountered this while checking if a C extension (imposm.parser) could be trivially ported for Python 3. Unfortunately not. I suppose


should be replaced with


but that isn't really clear from the docs.

assignee: docs at python
components: Documentation
messages: 238530
nosy: docs at python, tpievila
priority: normal
severity: normal
status: open
title: C API doc for PyObject_HEAD is outdated

Python tracker <report at bugs.python.org>

More information about the docs mailing list