gh-116590: Fix unused `current_thread_holds_gil` function warning (#116591)

This commit is contained in:
Nikita Sobolev 2024-03-11 16:25:04 +03:00 committed by GitHub
parent ffd79bea0f
commit 817fe33a1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -417,6 +417,7 @@ PyEval_ThreadsInitialized(void)
return _PyEval_ThreadsInitialized();
}
#ifndef NDEBUG
static inline int
current_thread_holds_gil(struct _gil_runtime_state *gil, PyThreadState *tstate)
{
@ -425,6 +426,7 @@ current_thread_holds_gil(struct _gil_runtime_state *gil, PyThreadState *tstate)
}
return _Py_atomic_load_int_relaxed(&gil->locked);
}
#endif
static void
init_shared_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil)