mirror of https://github.com/python/cpython
bpo-46417: _PyStructSequence_FiniType() updates _Py_RefTotal (GH-30988)
This commit is contained in:
parent
89fd7c3452
commit
9a24127113
|
@ -553,6 +553,9 @@ _PyStructSequence_FiniType(PyTypeObject *type)
|
|||
// Undo Py_INCREF(type) of _PyStructSequence_InitType().
|
||||
// Don't use Py_DECREF(): static type must not be deallocated
|
||||
Py_SET_REFCNT(type, 0);
|
||||
#ifdef Py_REF_DEBUG
|
||||
_Py_RefTotal--;
|
||||
#endif
|
||||
|
||||
// Make sure that _PyStructSequence_InitType() will initialize
|
||||
// the type again
|
||||
|
|
Loading…
Reference in New Issue