diff options
author | Guido van Rossum <guido@python.org> | 1994-09-07 14:36:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-09-07 14:36:45 (GMT) |
commit | 9776adf56561fa492f6261e1710ac2ac0e7fdc08 (patch) | |
tree | 5831d28831a4718596244fce2920ef1be77c43b1 /Objects | |
parent | c6cf1dd31758f945b75dcf4758b1424bbdf939c5 (diff) | |
download | cpython-9776adf56561fa492f6261e1710ac2ac0e7fdc08.zip cpython-9776adf56561fa492f6261e1710ac2ac0e7fdc08.tar.gz cpython-9776adf56561fa492f6261e1710ac2ac0e7fdc08.tar.bz2 |
rearranged code in debugging version of DELREF to avoid touching data
after it has been freed.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c index 072b50b..04e1ede 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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) |