https://github.com/python/cpython/commit/39d381f91e93559011587d764c1895ee30efb741
commit: 39d381f91e93559011587d764c1895ee30efb741
branch: main
author: Sam Gross <[email protected]>
committer: colesbury <[email protected]>
date: 2024-04-11T13:49:52-04:00
summary:

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.

files:
M Include/Python.h

diff --git a/Include/Python.h b/Include/Python.h
index ca38a98d8c4eca..bb771fb3aec980 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"

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to