diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-28 14:08:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 14:08:32 +0100 |
commit | 9a241271139a317597aca71d5971346b2cfe7dbd (patch) | |
tree | d20749d2328025cc00ff7b5a36a7d8c69063a70f /Objects/structseq.c | |
parent | 89fd7c34520aac493a8784a221366ed04452612b (diff) | |
download | cpython-git-9a241271139a317597aca71d5971346b2cfe7dbd.tar.gz |
bpo-46417: _PyStructSequence_FiniType() updates _Py_RefTotal (GH-30988)
Diffstat (limited to 'Objects/structseq.c')
-rw-r--r-- | Objects/structseq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c index cded877300..092e163465 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -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 |