summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi_feature_macros.inc
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2024-01-29 15:45:31 (GMT)
committerGitHub <noreply@github.com>2024-01-29 15:45:31 (GMT)
commit15fe8cea174772060b24c96d335a498aba3b8ed4 (patch)
tree6c16e4f7b3877249dd4dcffa28b9bde940e6fd39 /Modules/_testcapi_feature_macros.inc
parentc87233fd3fa77067013c35328f8c4884f0567a59 (diff)
downloadcpython-15fe8cea174772060b24c96d335a498aba3b8ed4.zip
cpython-15fe8cea174772060b24c96d335a498aba3b8ed4.tar.gz
cpython-15fe8cea174772060b24c96d335a498aba3b8ed4.tar.bz2
gh-91325: Skip Stable ABI checks with Py_TRACE_REFS special build (GH-92046)
Skip Stable ABI checks with Py_TRACE_REFS special build This build is not compatible with Py_LIMITED_API nor with the stable ABI.
Diffstat (limited to 'Modules/_testcapi_feature_macros.inc')
-rw-r--r--Modules/_testcapi_feature_macros.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_testcapi_feature_macros.inc b/Modules/_testcapi_feature_macros.inc
index a076e71..f5f3524 100644
--- a/Modules/_testcapi_feature_macros.inc
+++ b/Modules/_testcapi_feature_macros.inc
@@ -38,6 +38,15 @@ if (res) {
Py_DECREF(result); return NULL;
}
+#ifdef Py_TRACE_REFS
+ res = PyDict_SetItemString(result, "Py_TRACE_REFS", Py_True);
+#else
+ res = PyDict_SetItemString(result, "Py_TRACE_REFS", Py_False);
+#endif
+if (res) {
+ Py_DECREF(result); return NULL;
+}
+
#ifdef USE_STACKCHECK
res = PyDict_SetItemString(result, "USE_STACKCHECK", Py_True);
#else