Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Update check for <intrin.h>
  • Loading branch information
encukou committed Apr 9, 2026
commit e1b750050381e418ff1f85bc104d35b72ae69b92
12 changes: 5 additions & 7 deletions Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@
# endif
#endif

#if defined(Py_GIL_DISABLED)
# if defined(_MSC_VER)
# include <intrin.h> // __readgsqword()
# endif

# if defined(__MINGW32__)
# include <intrin.h> // __readgsqword()
#if !defined(Py_LIMITED_API)
# if defined(Py_GIL_DISABLED)
# if defined(_MSC_VER) || defined(__MINGW32__)
# include <intrin.h> // __readgsqword()
# endif
# endif
#endif // Py_GIL_DISABLED

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Using :c:macro:`Py_LIMITED_API` on a non-Windows free-threaded build no
longer needs an extra :c:macro:`Py_GIL_DISABLED`.