From 8ef44ef35c5f2a29b0d6c157830844aaa44b80c1 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Tue, 31 Oct 2023 01:16:55 +0900 Subject: [PATCH] gh-110481: Fix build bot for free-threaded mode --- Include/object.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Include/object.h b/Include/object.h index 6f116ef35a790c..1c7d7f407fe23e 100644 --- a/Include/object.h +++ b/Include/object.h @@ -231,7 +231,7 @@ typedef struct { PyAPI_FUNC(int) Py_Is(PyObject *x, PyObject *y); #define Py_Is(x, y) ((x) == (y)) -#ifndef Py_LIMITED_API +#if defined(Py_NOGIL) && !defined(Py_LIMITED_API) static inline uintptr_t _Py_ThreadId(void) { @@ -259,9 +259,7 @@ _Py_ThreadId(void) #endif return tid; } -#endif -#if defined(Py_NOGIL) && !defined(Py_LIMITED_API) static inline Py_ALWAYS_INLINE int _Py_IsOwnedByCurrentThread(PyObject *ob) {