gh-102304: Fix Non-Debug Builds (gh-102846)

Some debug-only code slipped in with gh-102543.

https://github.com/python/cpython/issues/102304
This commit is contained in:
Eric Snow 2023-03-20 11:28:13 -06:00 committed by GitHub
parent 28d369e070
commit 5c75b7a91c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View 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);