SIGN IN SIGN UP

gh-146636: abi3t: Define Py_GIL_DISABLED but do not use it (GH-148142)

When compiling for abi3t, define Py_GIL_DISABLED, so that users who
check it to enable additional locking aren't broken.

But also avoid using Py_GIL_DISABLED in Python headers themselves
-- abi3 and abi3t ought to be the same except
the _Py_OPAQUE_PYOBJECT differences.

A check for this is coming in a later PR.
It will require rewriting some preprocessor conditions, some of these
changes are included in this PR.
For _Py_IsOwnedByCurrentThread & supporting functions
I opted to move them to a cpython/ header, as they're rather self-contained.
P
Petr Viktorin committed
fbc1a5b0761f4331c7070201fefd5b5deb75ebdd
Parent: 5e9d90b
Committed by GitHub <noreply@github.com> on 4/7/2026, 7:06:17 AM