bpo-40241: Add pycore_gc.h header file by vstinner · Pull Request #19494 · python/cpython (original) (raw)

Move the PyGC_Head structure and the following private macros to the
internal C API:

Keep the private _PyGC_FINALIZED() macro in the public C API for
backward compatibility with Python 3.8: make it an alias to the new
PyObject_GC_IsFinalized() function.

Move the SIZEOF_PYGC_HEAD constant from _testcapi module to
_testinternalcapi module.

https://bugs.python.org/issue40241