]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-102304: Fix Non-Debug Builds (gh-102846)
authorEric Snow <ericsnowcurrently@gmail.com>
Mon, 20 Mar 2023 17:28:13 +0000 (11:28 -0600)
committerGitHub <noreply@github.com>
Mon, 20 Mar 2023 17:28:13 +0000 (11:28 -0600)
Some debug-only code slipped in with gh-102543.

https://github.com/python/cpython/issues/102304

Python/pystate.c

index 4d4213551a8b1cca090f452611135903eb62ab47..60adb54685ce68913a285bc7341523a412aa83e6 100644 (file)
@@ -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);