]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-140544: fix build for including `pycore_pystate.h` when `HAVE_THREAD_LOCAL` is... 140694/head
authorKumar Aditya <kumaraditya@python.org>
Mon, 27 Oct 2025 20:10:41 +0000 (01:40 +0530)
committerGitHub <noreply@github.com>
Mon, 27 Oct 2025 20:10:41 +0000 (01:40 +0530)
Include/internal/pycore_pystate.h

index 503cddc73fc4642c8de9df1826bf9fa4d250c1f0..cab458f84028e237dbcf31f18785f4be9a74e63c 100644 (file)
@@ -89,7 +89,7 @@ _Py_ThreadCanHandleSignals(PyInterpreterState *interp)
 /* Variable and static inline functions for in-line access to current thread
    and interpreter state */
 
-#if defined(HAVE_THREAD_LOCAL) && !defined(Py_BUILD_CORE_MODULE)
+#if !defined(Py_BUILD_CORE_MODULE)
 extern _Py_thread_local PyThreadState *_Py_tss_tstate;
 extern _Py_thread_local PyInterpreterState *_Py_tss_interp;
 #endif
@@ -115,7 +115,7 @@ PyAPI_FUNC(PyThreadState *) _PyThreadState_GetCurrent(void);
 static inline PyThreadState*
 _PyThreadState_GET(void)
 {
-#if defined(HAVE_THREAD_LOCAL) && !defined(Py_BUILD_CORE_MODULE)
+#if !defined(Py_BUILD_CORE_MODULE)
     return _Py_tss_tstate;
 #else
     return _PyThreadState_GetCurrent();