[New-bugs-announce] [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

  self->ob_type

should be replaced with

  Py_TYPE(self)

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>
<http://bugs.python.org/issue23710>
_______________________________________


More information about the New-bugs-announce mailing list