summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/pystate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 464e5d6..5c1636a 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -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();
}