[issue33597] Compact PyGC_Head
STINNER Victor
report at bugs.python.org
Wed May 30 06:14:28 EDT 2018
STINNER Victor <vstinner at redhat.com> added the comment:
I asked if this change breaks the stable ABI. Steve Dower replied:
"Looks like it breaks the 3.7 ABI, which is certainly not allowed at this time. But it’s not a limited API structure, so no problem for 3.8."
https://mail.python.org/pipermail/python-dev/2018-May/153745.html
I didn't understand the answer. It breaks the ABI but it doesn't break the API?
It seems like PyObject.ob_refcnt is part of the "Py_LIMITED_API" and so an extension module using the stable API/ABI can access directly the field with no function call. For example, Py_INCREF() modifies directly the field at the ABI level.
*But* PyGC_Head is a strange thing since it's stored "before" the usual PyObject* pointer, so fields starting at PyObject* address are not affected by this change, no?
Hopefully, PyGC_Head seems to be excluded from PyGC_Head, and so it seems like the PR 7043 doesn't break the stable *ABI*.
Can someone please confirm my analysis?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33597>
_______________________________________
More information about the Python-bugs-list
mailing list