gh-135906: Test the internal C API in test_cext (#136247)

Remove duplicated definition: atexit_datacallbackfunc type
is already defined by Include/cpython/pylifecycle.h.
This commit is contained in:
Victor Stinner 2025-07-11 16:48:43 +02:00 committed by GitHub
parent cbf007beeb
commit 2c9a8011c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 103 additions and 36 deletions

View file

@ -47,6 +47,7 @@ def main():
std = os.environ.get("CPYTHON_TEST_CPP_STD", "")
module_name = os.environ["CPYTHON_TEST_EXT_NAME"]
limited = bool(os.environ.get("CPYTHON_TEST_LIMITED", ""))
internal = bool(int(os.environ.get("TEST_INTERNAL_C_API", "0")))
cppflags = list(CPPFLAGS)
cppflags.append(f'-DMODULE_NAME={module_name}')
@ -82,6 +83,9 @@ def main():
version = sys.hexversion
cppflags.append(f'-DPy_LIMITED_API={version:#x}')
if internal:
cppflags.append('-DTEST_INTERNAL_C_API=1')
# On Windows, add PCbuild\amd64\ to include and library directories
include_dirs = []
library_dirs = []