We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4581298 commit e1b7500Copy full SHA for e1b7500
Include/Python.h
@@ -47,13 +47,11 @@
47
# endif
48
#endif
49
50
-#if defined(Py_GIL_DISABLED)
51
-# if defined(_MSC_VER)
52
-# include <intrin.h> // __readgsqword()
53
-# endif
54
-
55
-# if defined(__MINGW32__)
56
+#if !defined(Py_LIMITED_API)
+# if defined(Py_GIL_DISABLED)
+# if defined(_MSC_VER) || defined(__MINGW32__)
+# include <intrin.h> // __readgsqword()
+# endif
57
58
#endif // Py_GIL_DISABLED
59
Misc/NEWS.d/next/C_API/2026-04-09-14-45-44.gh-issue-148267.p84kG_.rst
@@ -0,0 +1,2 @@
1
+Using :c:macro:`Py_LIMITED_API` on a non-Windows free-threaded build no
2
+longer needs an extra :c:macro:`Py_GIL_DISABLED`.
0 commit comments