summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/pystate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 4d42135..60adb54 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -482,8 +482,10 @@ _PyRuntimeState_Init(_PyRuntimeState *runtime)
void
_PyRuntimeState_Fini(_PyRuntimeState *runtime)
{
+#ifdef Py_REF_DEBUG
/* The reftotal is cleared by _Py_FinalizeRefTotal(). */
assert(runtime->object_state.reftotal == 0);
+#endif
if (gilstate_tss_initialized(runtime)) {
gilstate_tss_fini(runtime);