]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
When tracing references, reset the type and size of tuples allocated
authorGuido van Rossum <guido@python.org>
Fri, 11 Dec 1998 14:56:38 +0000 (14:56 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 11 Dec 1998 14:56:38 +0000 (14:56 +0000)
from the fast free list -- the type (at least) is reset by
_Py_Dealloc().

Objects/tupleobject.c

index 2286b01dbe1aabd320b18e437f964c1c1f9f9b7a..4b7714c9cf6287596871ae6091916f94c7477da3 100644 (file)
@@ -73,6 +73,10 @@ PyTuple_New(size)
                free_tuples[size] = (PyTupleObject *) op->ob_item[0];
 #ifdef COUNT_ALLOCS
                fast_tuple_allocs++;
+#endif
+#ifdef Py_TRACE_REFS
+               op->ob_type = &PyTuple_Type;
+               op->ob_size = size;
 #endif
        }
        else