Skip to content

Commit

Permalink
pythongh-116590: Fix unused current_thread_holds_gil function warni…
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored and adorilson committed Mar 25, 2024
1 parent b517f65 commit 766df0f
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 766df0f

Please sign in to comment.