summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/dictobject.c1
-rw-r--r--Objects/tupleobject.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index e005f8e..b39c614 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -500,6 +500,7 @@ _PyDict_MaybeUntrack(PyObject *op)
_PyObject_GC_MAY_BE_TRACKED(ep[i].me_key))
return;
}
+ DECREASE_TRACK_COUNT
_PyObject_GC_UNTRACK(op);
}
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 11be0e1..290107a 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -50,9 +50,6 @@ PyTuple_New(register Py_ssize_t size)
{
register PyTupleObject *op;
Py_ssize_t i;
-#ifdef SHOW_TRACK_COUNT
- count_tracked++;
-#endif
if (size < 0) {
PyErr_BadInternalCall();
return NULL;
@@ -104,6 +101,9 @@ PyTuple_New(register Py_ssize_t size)
Py_INCREF(op); /* extra INCREF so that this is never freed */
}
#endif
+#ifdef SHOW_TRACK_COUNT
+ count_tracked++;
+#endif
_PyObject_GC_TRACK(op);
return (PyObject *) op;
}