8000 gh-101181: Fix `unused-variable` warning in `pystate.c` (#101188) · python/cpython@8be6992 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8be6992

Browse files
gh-101181: Fix unused-variable warning in pystate.c (#101188)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
1 parent 3847a6c commit 8be6992

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Python/pystate.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,11 +1878,14 @@ _PyGILState_SetTstate(PyThreadState *tstate)
18781878
* interpreter is responsible to initialize it. */
18791879
return _PyStatus_OK();
18801880
}
1881+
1882+
#ifndef NDEBUG
18811883
_PyRuntimeState *runtime = tstate->interp->runtime;
18821884

18831885
assert(runtime->gilstate.autoInterpreterState == tstate->interp);
18841886
assert(current_tss_get(runtime) == tstate);
18851887
assert(tstate->gilstate_counter == 1);
1888+
#endif
18861889

18871890
return _PyStatus_OK();
18881891
}

0 commit comments

Comments
 (0)
0