diff options
author | Sam Gross <colesbury@gmail.com> | 2024-04-11 17:49:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 17:49:52 (GMT) |
commit | 39d381f91e93559011587d764c1895ee30efb741 (patch) | |
tree | 85f8d86fbb2820a0efc03eba943e89e1f72ff662 | |
parent | c06be6bbb8d138dde50c0a07cbd64496bee537c5 (diff) | |
download | cpython-39d381f91e93559011587d764c1895ee30efb741.zip cpython-39d381f91e93559011587d764c1895ee30efb741.tar.gz cpython-39d381f91e93559011587d764c1895ee30efb741.tar.bz2 |
gh-111506: Error if the limited API is used in free-threaded build (#117762)
Issue a build time error if both `Py_LIMITED_API` and `Py_GIL_DISABLED`
are defined.
-rw-r--r-- | Include/Python.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h index ca38a98..bb771fb 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -45,6 +45,11 @@ # endif #endif +// gh-111506: The free-threaded build is not compatible with the limited API +// or the stable ABI. +#if defined(Py_LIMITED_API) && defined(Py_GIL_DISABLED) +# error "The limited API is not currently supported in the free-threaded build" +#endif // Include Python header files #include "pyport.h" |