From: Guido van Rossum Date: Fri, 11 Dec 1998 14:56:38 +0000 (+0000) Subject: When tracing references, reset the type and size of tuples allocated X-Git-Tag: v1.5.2b1~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68055ce6fe015ff07352401045e01e6e2d861f11;p=thirdparty%2FPython%2Fcpython.git When tracing references, reset the type and size of tuples allocated from the fast free list -- the type (at least) is reset by _Py_Dealloc(). --- diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 2286b01dbe1a..4b7714c9cf62 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -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