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@python components: Documentation messages: 238530 nosy: docs@python, tpievila priority: normal severity: normal status: open title: C API doc for PyObject_HEAD is outdated _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23710> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com