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().
This commit is contained in:
Guido van Rossum 1998-12-11 14:56:38 +00:00
parent 21ef088265
commit 68055ce6fe
1 changed files with 4 additions and 0 deletions

View 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