]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727)
authorVictor Stinner <vstinner@python.org>
Fri, 22 Sep 2023 14:54:37 +0000 (16:54 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Sep 2023 14:54:37 +0000 (14:54 +0000)
commit09a25616a908a028b6373f9ab372d86edf064282
tree38675294937df3ea61de15b73271ebc42339d487
parentc32abf1f21c4bd32abcefe4d601611b152568961
gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727)

Make sure that the internal C API is not tested by mistake by
_testcapi.

Undefine Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros in
Modules/_testcapi/parts.h: move code from _testcapimodule.c.

heaptype_relative.c and vectorcall_limited.c are using the limited C
API which is incompatible with the internal C API.

Move test_long_numbits() from _testcapi to _testinternalcapi since it
uses the internal C API "pycore_long.h".

Fix Modules/_testcapi/pyatomic.c: don't include Python.h directly,
just include _testcapi/parts.h.

Ajust "make check-c-globals" for these changes.
Modules/_testcapi/clinic/long.c.h
Modules/_testcapi/long.c
Modules/_testcapi/parts.h
Modules/_testcapi/pyatomic.c
Modules/_testcapimodule.c
Modules/_testinternalcapi.c
Modules/clinic/_testinternalcapi.c.h
Tools/c-analyzer/c_parser/preprocessor/gcc.py