@@ -125,10 +125,11 @@ Compiling for Stable ABI
125125
126126.. note ::
127127
128- When using a build tool (for example, Setuptools), the tool is
129- generally responsible for setting macros and synchronizing them with
130- extension filenames and other metadata.
131- Prefer using the tool's options over defining the macros manually.
128+ Build tools (such as, for example, meson-python, scikit-build-core,
129+ or Setuptools) often have a mechanism for setting macros and synchronizing
130+ them with extension filenames and other metadata.
131+ Prefer using such a mechanism, if it exists, over defining the
132+ macros manually.
132133
133134 The rest of this section is mainly relevant for tool authors, and for
134135 people who compile extensions manually.
@@ -150,10 +151,12 @@ For reference, the values for a few recent Python versions are:
150151
151152.. version-hex-cheatsheet ::
152153
153- When the macro(s) are defined, ``Python.h `` will only expose API that is
154+ When one of the macros is defined, ``Python.h `` will only expose API that is
154155compatible with the given Stable ABI -- that is, the
155156:ref: `Limited API <limited-api-list >` plus some definitions that need to be
156157visible to the compiler but should not be used directly.
158+ When both are defined, ``Python.h `` will only expose API compatible with
159+ both Stable ABIs.
157160
158161.. c :macro :: Py_LIMITED_API
159162
@@ -186,7 +189,10 @@ defaults to the value of :c:macro:`!Py_TARGET_ABI3T`.
186189This means that there are two ways to build for both ``abi3 `` and ``abi3t ``:
187190
188191- define both :c:macro: `!Py_LIMITED_API ` and :c:macro: `!Py_TARGET_ABI3T `, or
189- - define only :c:macro: `!Py_LIMITED_API ` and build for free-threaded Python.
192+ - define only :c:macro: `!Py_LIMITED_API ` and:
193+
194+ - on Windows, define :c:macro: `!Py_GIL_DISABLED `;
195+ - on other systems, use the headers of free-threaded build of Python.
190196
191197
192198.. _limited-api-scope-and-performance :
0 commit comments