summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-05-06 14:58:32 (GMT)
committerGitHub <noreply@github.com>2023-05-06 14:58:32 (GMT)
commit6616710731b9ad1a4e6b73696e8bd5c40cf8762d (patch)
treed96fbd093550220b0eadb39c2ea8c9cc9d4e1dc5 /Python
parentf5088006ca8e9654fbc3de119462f0ab764e408b (diff)
downloadcpython-6616710731b9ad1a4e6b73696e8bd5c40cf8762d.zip
cpython-6616710731b9ad1a4e6b73696e8bd5c40cf8762d.tar.gz
cpython-6616710731b9ad1a4e6b73696e8bd5c40cf8762d.tar.bz2
gh-104233: Fix "unused variable" warning in `ceval_gil.c` (#104234)
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 a390bec..1ac0dbc 100644
--- a/Python/ceval_gil.c
+++ b/Python/ceval_gil.c
@@ -547,9 +547,11 @@ _PyEval_FiniGIL(PyInterpreterState *interp)
return;
}
else if (!interp->ceval.own_gil) {
+#ifdef Py_DEBUG
PyInterpreterState *main_interp = _PyInterpreterState_Main();
assert(interp != main_interp);
assert(interp->ceval.gil == main_interp->ceval.gil);
+#endif
interp->ceval.gil = NULL;
return;
}