mirror of
https://github.com/python/cpython.git
synced 2026-06-23 11:33:30 -04:00
fbc1a5b076
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.
The Python C API ================ The C API is divided into these sections: 1. ``Include/``: Limited API 2. ``Include/cpython/``: CPython implementation details 3. ``Include/cpython/``, names with the ``PyUnstable_`` prefix: API that can change between minor releases 4. ``Include/internal/``, and any name with ``_`` prefix: The internal API Information on changing the C API is available `in the developer guide`_ .. _in the developer guide: https://devguide.python.org/c-api/