Skip to content

Commit

Permalink
gh-116590: Fix unused current_thread_holds_gil function warning (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Mar 11, 2024
1 parent ffd79be commit 817fe33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit 817fe33

Please sign in to comment.