mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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:
parent
21ef088265
commit
68055ce6fe
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue