]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
rearranged code in debugging version of DELREF to avoid touching data
authorGuido van Rossum <guido@python.org>
Wed, 7 Sep 1994 14:36:45 +0000 (14:36 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 7 Sep 1994 14:36:45 +0000 (14:36 +0000)
after it has been freed.

Objects/object.c

index 072b50bbbb9478582eca7914eeebde00005ca5e3..04e1ede89df03afaad78558f569fec2869877cdc 100644 (file)
@@ -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)