aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/Python.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/Python.h')
-rw-r--r--Include/Python.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 64be8014589..19417df698c 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -45,19 +45,19 @@
# 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
+#if defined(Py_GIL_DISABLED)
+# if defined(Py_LIMITED_API) && !defined(_Py_OPAQUE_PYOBJECT)
+# error "Py_LIMITED_API is not currently supported in the free-threaded build"
+# endif
-#if defined(Py_GIL_DISABLED) && defined(_MSC_VER)
-# include <intrin.h> // __readgsqword()
-#endif
+# if defined(_MSC_VER)
+# include <intrin.h> // __readgsqword()
+# endif
-#if defined(Py_GIL_DISABLED) && defined(__MINGW32__)
-# include <intrin.h> // __readgsqword()
-#endif
+# if defined(__MINGW32__)
+# include <intrin.h> // __readgsqword()
+# endif
+#endif // Py_GIL_DISABLED
// Include Python header files
#include "pyport.h"