From: Petr Viktorin Date: Wed, 17 Dec 2025 15:33:09 +0000 (+0100) Subject: gh-142225: Add PyABIInfo_VAR to to _testcapimodule & _testinternalcapi (GH-142833) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d81eab923f71f6b7e80f130bc3ad5ca613b88fd;p=thirdparty%2FPython%2Fcpython.git gh-142225: Add PyABIInfo_VAR to to _testcapimodule & _testinternalcapi (GH-142833) --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index c14f925b4e76..de6d3cbce54f 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -3523,7 +3523,10 @@ _testcapi_exec(PyObject *m) return 0; } +PyABIInfo_VAR(abi_info); + static PyModuleDef_Slot _testcapi_slots[] = { + {Py_mod_abi, &abi_info}, {Py_mod_exec, _testcapi_exec}, {Py_mod_gil, Py_MOD_GIL_NOT_USED}, {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index 4140cd23ded9..a7fbb0f87b6e 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -2696,7 +2696,10 @@ module_exec(PyObject *module) return 0; } +PyABIInfo_VAR(abi_info); + static struct PyModuleDef_Slot module_slots[] = { + {Py_mod_abi, &abi_info}, {Py_mod_exec, module_exec}, {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED}, {Py_mod_gil, Py_MOD_GIL_NOT_USED}, diff --git a/Tools/c-analyzer/cpython/_analyzer.py b/Tools/c-analyzer/cpython/_analyzer.py index 6f0f46489284..43ed552fcf75 100644 --- a/Tools/c-analyzer/cpython/_analyzer.py +++ b/Tools/c-analyzer/cpython/_analyzer.py @@ -76,6 +76,7 @@ _OTHER_SUPPORTED_TYPES = { 'PyBufferProcs', 'PyStructSequence_Field[]', 'PyStructSequence_Desc', + 'PyABIInfo', } # XXX We should normalize all cases to a single name,