]> granicus.if.org Git - python/commitdiff
Merged revisions 70550 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 23 Mar 2009 19:19:54 +0000 (19:19 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 23 Mar 2009 19:19:54 +0000 (19:19 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70550 | antoine.pitrou | 2009-03-23 20:17:00 +0100 (lun., 23 mars 2009) | 3 lines

  The tracking statistics were actually too pessimistic
........

Objects/dictobject.c
Objects/tupleobject.c

index e005f8ea5ca4e83412cd64c44880a3b95f5a0154..b39c61477617641e3803bcc9fcbf4396aec6089e 100644 (file)
@@ -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);
 }
 
index 11be0e19dc62d217cfdfa8d5c742eda304d05377..290107ad346ca86fda9190f0089ffc48a52d5c20 100644 (file)
@@ -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;
@@ -103,6 +100,9 @@ PyTuple_New(register Py_ssize_t size)
                ++numfree[0];
                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;