summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-01-28 13:08:32 (GMT)
committerGitHub <noreply@github.com>2022-01-28 13:08:32 (GMT)
commit9a241271139a317597aca71d5971346b2cfe7dbd (patch)
treed20749d2328025cc00ff7b5a36a7d8c69063a70f /Objects
parent89fd7c34520aac493a8784a221366ed04452612b (diff)
downloadcpython-9a241271139a317597aca71d5971346b2cfe7dbd.zip
cpython-9a241271139a317597aca71d5971346b2cfe7dbd.tar.gz
cpython-9a241271139a317597aca71d5971346b2cfe7dbd.tar.bz2
bpo-46417: _PyStructSequence_FiniType() updates _Py_RefTotal (GH-30988)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/structseq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c
index cded877..092e163 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