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:
Nikita Sobolev 2023-01-20 21:01:30 +03:00 committed by GitHub
parent 3847a6c64b
commit 8be6992620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}