[issue34522] PyTypeObject's tp_base initialization bug

Eddie Elizondo report at bugs.python.org
Tue Aug 28 15:59:12 EDT 2018


Eddie Elizondo <eduardo.elizondorueda at gmail.com> added the comment:

@ronaldoussoren Please read the complete analysis from the mailing list: https://mail.python.org/pipermail/python-dev/2018-August/154946.html. The description here was just a rehash and I probably missed some context. 

Particularly, when I said: "PyTypeObject's ob_type should always be set by PyType_Ready" I was referring to the PyTypeObject's that are statically set in C code. Metatypes explicitly have to set the ob_type and that's already handled.

In the current state of things, you have static PyTypeObjects that are being used before calling PyType_Ready due to this macro. This change just standardizes the header of static PyTypeObject throughout the entire codebase.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34522>
_______________________________________


More information about the Python-bugs-list mailing list