Skip to content

Commit 9a24127

Browse files
authored
bpo-46417: _PyStructSequence_FiniType() updates _Py_RefTotal (GH-30988)
1 parent 89fd7c3 commit 9a24127

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/structseq.c

+3
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ _PyStructSequence_FiniType(PyTypeObject *type)
553553
// Undo Py_INCREF(type) of _PyStructSequence_InitType().
554554
// Don't use Py_DECREF(): static type must not be deallocated
555555
Py_SET_REFCNT(type, 0);
556+
#ifdef Py_REF_DEBUG
557+
_Py_RefTotal--;
558+
#endif
556559

557560
// Make sure that _PyStructSequence_InitType() will initialize
558561
// the type again

0 commit comments

Comments
 (0)