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.
This commit is contained in:
Petr Viktorin 2024-01-29 16:45:31 +01:00 committed by GitHub
parent c87233fd3f
commit 15fe8cea17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 20 deletions

View file

@ -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