Skip to content

Commit 9613749

Browse files
committed
Fix PyThreadState_GetID() on Python 3.7
1 parent 429d3f7 commit 9613749

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎pythoncapi_compat.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ static inline PyInterpreterState* PyInterpreterState_Get(void)
352352

353353

354354
// bpo-39947 added PyInterpreterState_Get() to Python 3.9.0a6
355-
#if 0x030700A1 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030900A6 && !defined(PYPY_VERSION)
355+
#if (0x030700A1 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030900A6 \
356+
&& !defined(PYPY_VERSION) && !defined(Py_LIMITED_API))
356357
static inline uint64_t PyThreadState_GetID(PyThreadState *tstate)
357358
{
358359
assert(tstate != _Py_NULL);

0 commit comments

Comments
 (0)