From 6616710731b9ad1a4e6b73696e8bd5c40cf8762d Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 6 May 2023 17:58:32 +0300 Subject: gh-104233: Fix "unused variable" warning in `ceval_gil.c` (#104234) --- Python/ceval_gil.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v0.12