mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-101181: Fix unused-variable
warning in pystate.c
(#101188)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
This commit is contained in:
parent
3847a6c64b
commit
8be6992620
1 changed files with 3 additions and 0 deletions
|
@ -1878,11 +1878,14 @@ _PyGILState_SetTstate(PyThreadState *tstate)
|
|||
* interpreter is responsible to initialize it. */
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
_PyRuntimeState *runtime = tstate->interp->runtime;
|
||||
|
||||
assert(runtime->gilstate.autoInterpreterState == tstate->interp);
|
||||
assert(current_tss_get(runtime) == tstate);
|
||||
assert(tstate->gilstate_counter == 1);
|
||||
#endif
|
||||
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue