]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40241: Add pycore_gc.h header file (GH-19494)
authorVictor Stinner <vstinner@python.org>
Mon, 13 Apr 2020 09:38:42 +0000 (11:38 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2020 09:38:42 +0000 (11:38 +0200)
commit0135598d729d01f35ce08d47160adaa095a6149f
treeb272b49c6e2ed7b5270f9aeb565fe61a5ff9d634
parent85dd6bb1f61f7edcd6ac0b640a98644531690a0e
bpo-40241: Add pycore_gc.h header file (GH-19494)

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

* _PyGCHead_FINALIZED()
* _PyGCHead_NEXT()
* _PyGCHead_PREV()
* _PyGCHead_SET_FINALIZED()
* _PyGCHead_SET_NEXT()
* _PyGCHead_SET_PREV()
* _PyGC_FINALIZED()
* _PyGC_PREV_MASK
* _PyGC_PREV_MASK_COLLECTING
* _PyGC_PREV_MASK_FINALIZED
* _PyGC_PREV_SHIFT
* _PyGC_SET_FINALIZED()
* _PyObject_GC_IS_TRACKED()
* _PyObject_GC_MAY_BE_TRACKED()
* _Py_AS_GC(o)

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.
Include/cpython/objimpl.h
Include/internal/pycore_gc.h [new file with mode: 0644]
Include/internal/pycore_pymem.h
Lib/test/support/__init__.py
Lib/test/test_sys.py
Misc/NEWS.d/next/C API/2020-04-13-02-56-24.bpo-40241._FOf7E.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Modules/_testinternalcapi.c