mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +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)
|
DELREF(op)
|
||||||
object *op;
|
object *op;
|
||||||
{
|
{
|
||||||
|
destructor dealloc = op->ob_type->tp_dealloc;
|
||||||
UNREF(op);
|
UNREF(op);
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
op->ob_type->tp_free++;
|
op->ob_type->tp_free++;
|
||||||
#endif
|
#endif
|
||||||
(*(op)->ob_type->tp_dealloc)(op);
|
|
||||||
op->ob_type = NULL;
|
op->ob_type = NULL;
|
||||||
|
(*dealloc)(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
printrefs(fp)
|
printrefs(fp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue