]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-142225: Add PyABIInfo_VAR to to _testcapimodule & _testinternalcapi (GH-142833)
authorPetr Viktorin <encukou@gmail.com>
Wed, 17 Dec 2025 15:33:09 +0000 (16:33 +0100)
committerGitHub <noreply@github.com>
Wed, 17 Dec 2025 15:33:09 +0000 (16:33 +0100)
Modules/_testcapimodule.c
Modules/_testinternalcapi.c
Tools/c-analyzer/cpython/_analyzer.py

index c14f925b4e76324b27ae5cd17be2e4cdbd7b1215..de6d3cbce54fbe0f75684945ea2aa11eb8023e8c 100644 (file)
@@ -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},
index 4140cd23ded95e6adc0fc65d7da6f5ec931b4d9c..a7fbb0f87b6e9cc3a75b2d198a2206de86ea5f3a 100644 (file)
@@ -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},
index 6f0f464892845fd2639ecff4be304825873eea35..43ed552fcf75d9025af4acce33038a25699617d7 100644 (file)
@@ -76,6 +76,7 @@ _OTHER_SUPPORTED_TYPES = {
     'PyBufferProcs',
     'PyStructSequence_Field[]',
     'PyStructSequence_Desc',
+    'PyABIInfo',
 }
 
 # XXX We should normalize all cases to a single name,