]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106320: Remove private _PyObject C API (#107147)
authorVictor Stinner <vstinner@python.org>
Sun, 23 Jul 2023 20:09:08 +0000 (22:09 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Jul 2023 20:09:08 +0000 (20:09 +0000)
commit0d6dfd68d22762c115d202515fe3310bfb42e327
treed20012091337f17a311bcc2309b3b03eedc94377
parent0810b0c435415c09c1907c6f418585bed558a2c1
gh-106320: Remove private _PyObject C API (#107147)

Move private debug _PyObject functions to the internal C API
(pycore_object.h):

* _PyDebugAllocatorStats()
* _PyObject_CheckConsistency()
* _PyObject_DebugTypeStats()
* _PyObject_IsFreed()

No longer export most of these functions, except of
_PyObject_IsFreed().

Move test functions using _PyObject_IsFreed() from _testcapi to
_testinternalcapi. check_pyobject_is_freed() test no longer catch
_testcapi.error: the tested function cannot raise _testcapi.error.
12 files changed:
Include/cpython/object.h
Include/internal/pycore_object.h
Lib/test/test_capi/test_mem.py
Modules/_testcapi/mem.c
Modules/_testclinic.c
Modules/_testinternalcapi.c
Objects/dictobject.c
Objects/floatobject.c
Objects/listobject.c
Objects/obmalloc.c
Objects/tupleobject.c
Python/sysmodule.c