From 68055ce6fe015ff07352401045e01e6e2d861f11 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 11 Dec 1998 14:56:38 +0000 Subject: 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(). --- Objects/tupleobject.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 2286b01..4b7714c 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -74,6 +74,10 @@ PyTuple_New(size) #ifdef COUNT_ALLOCS fast_tuple_allocs++; #endif +#ifdef Py_TRACE_REFS + op->ob_type = &PyTuple_Type; + op->ob_size = size; +#endif } else #endif -- cgit v0.12