summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2024-03-11 13:25:04 (GMT)
committerGitHub <noreply@github.com>2024-03-11 13:25:04 (GMT)
commit817fe33a1da747c57b467f73a47b701c0b0eb911 (patch)
tree407c6ffd1a850ca94d72512232042798ababa48d /Python
parentffd79bea0f032df5a2e7f75e8c823a09cdc7c7a2 (diff)
downloadcpython-817fe33a1da747c57b467f73a47b701c0b0eb911.zip
cpython-817fe33a1da747c57b467f73a47b701c0b0eb911.tar.gz
cpython-817fe33a1da747c57b467f73a47b701c0b0eb911.tar.bz2
gh-116590: Fix unused `current_thread_holds_gil` function warning (#116591)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval_gil.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c
index f5c4430..edfc466 100644
--- a/Python/ceval_gil.c
+++ b/Python/ceval_gil.c
@@ -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)