mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
rearranged code in debugging version of DELREF to avoid touching data
after it has been freed.
This commit is contained in:
parent
c6cf1dd317
commit
9776adf565
1 changed files with 2 additions and 1 deletions
|
@ -406,12 +406,13 @@ UNREF(op)
|
|||
DELREF(op)
|
||||
object *op;
|
||||
{
|
||||
destructor dealloc = op->ob_type->tp_dealloc;
|
||||
UNREF(op);
|
||||
#ifdef COUNT_ALLOCS
|
||||
op->ob_type->tp_free++;
|
||||
#endif
|
||||
(*(op)->ob_type->tp_dealloc)(op);
|
||||
op->ob_type = NULL;
|
||||
(*dealloc)(op);
|
||||
}
|
||||
|
||||
printrefs(fp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue