]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89653: PEP 670: Convert pycore_gc.h macros to functions (#92649)
authorVictor Stinner <vstinner@python.org>
Wed, 11 May 2022 11:37:18 +0000 (13:37 +0200)
committerGitHub <noreply@github.com>
Wed, 11 May 2022 11:37:18 +0000 (13:37 +0200)
commitffcc7cd57f6a52c6074ecc9f0a9f0177fb1dbfee
tree2ac1b0284481d8fb8ef958e141043b392e966480
parent707839b0fe02ba2c891a40f40e7a869d84c2c9c5
gh-89653: PEP 670: Convert pycore_gc.h macros to functions (#92649)

Convert the following macros to static inline functions:

* _Py_AS_GC()
* _PyGCHead_FINALIZED(), _PyGCHead_SET_FINALIZED()
* _PyGCHead_NEXT(), _PyGCHead_SET_NEXT()
* _PyGCHead_PREV(), _PyGCHead_SET_PREV()
* _PyGC_FINALIZED(), _PyGC_SET_FINALIZED()
* _PyObject_GC_IS_TRACKED()
* _PyObject_GC_MAY_BE_TRACKED()

Add a macro wrapping the _PyObject_GC_IS_TRACKED() function to cast
the argument to PyObject*.
Include/internal/pycore_gc.h
Objects/object.c