mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
gh-110481: Fix _Py_ThreadId for non-free-threaded mode (gh-111503)
This commit is contained in:
parent
bca3305429
commit
55df2deb1a
1 changed files with 1 additions and 3 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue