On Mon, Dec 6, 2021 at 9:54 PM Guido van Rossum <[email protected]> wrote: > Also, it looks like Mark is proposing to *remove* _PyObject_GC_Malloc from > stable_abi.txt
In Python 3.2, _PyObject_GC_Malloc() is implemented as a function. PyObject_GC_New() macro calls _PyObject_GC_New() function. Internally, PyType_GenericAlloc() and _PyObject_GC_New() call _PyObject_GC_Malloc(). => IMO _PyObject_GC_Malloc() doesn't need to be part of Python 3.2 stable ABI In Python 3.11, _PyObject_GC_Malloc() is still implemented as a function. It's not used in the C API header files, it's only used in the implementation of other functions. => IMO again, IMO _PyObject_GC_Malloc() doesn't need to be part of Python 3.11 stable ABI It would be nice if someone could double check my analysis. In Python 3.7, there was still "#undef _PyObject_GC_Malloc" in Modules/gcmodule.c with the comment: /* extension modules might be compiled with GC support so these functions must always be available */ This code comes from an old commit made for ABI compatibility with... Python 2.2! https://github.com/python/cpython/commit/fec4eb1be1bb193ab3db0645a2c084c34868401c --- commit fec4eb1be1bb193ab3db0645a2c084c34868401c Author: Neil Schemenauer <[email protected]> Date: Fri Apr 12 02:41:03 2002 +0000 Allow PyObject_Del to be used as a function designator. Provide binary compatibility function. Make PyObject_GC_Track and PyObject_GC_UnTrack functions instead of trivial macros wrapping functions. Provide binary compatibility functions. --- I don't think that Python 3.2 needs to provide ABI compatibility with Python 2.2. Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/4SUSFYA2P3CLCP3ULYSXETM2QEBNUWQG/ Code of Conduct: http://python.org/psf/codeofconduct/
