Skip to content

Commit e1b7500

Browse files
committed
Update check for <intrin.h>
1 parent 4581298 commit e1b7500

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Include/Python.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@
4747
# endif
4848
#endif
4949

50-
#if defined(Py_GIL_DISABLED)
51-
# if defined(_MSC_VER)
52-
# include <intrin.h> // __readgsqword()
53-
# endif
54-
55-
# if defined(__MINGW32__)
56-
# include <intrin.h> // __readgsqword()
50+
#if !defined(Py_LIMITED_API)
51+
# if defined(Py_GIL_DISABLED)
52+
# if defined(_MSC_VER) || defined(__MINGW32__)
53+
# include <intrin.h> // __readgsqword()
54+
# endif
5755
# endif
5856
#endif // Py_GIL_DISABLED
5957

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)