diff options
author | Guido van Rossum <guido@python.org> | 2000-07-01 01:00:38 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-07-01 01:00:38 (GMT) |
commit | 4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe (patch) | |
tree | 33188a2be2a6d62e6f647f842303aa80ce9de474 /Objects/object.c | |
parent | ce8e1dc39531c8bed47cef0dd9d05bd3e9c0bd66 (diff) | |
download | cpython-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.zip cpython-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.tar.gz cpython-4cc6ac7b8797dd55cf9c93b6da7eae1d225b7dfe.tar.bz2 |
Neil Schemenauer: small fixes for GC
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Objects/object.c b/Objects/object.c index 4479e7d..3052d38 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -171,14 +171,11 @@ _PyObject_Del(op) PyObject *op; { #ifdef WITH_CYCLE_GC - if (PyType_IS_GC(op->ob_type)) { - PyGC_Head *g = PyObject_AS_GC(op); - PyObject_FREE(g); - } else -#endif - { - PyObject_FREE(op); + if (op && PyType_IS_GC(op->ob_type)) { + op = (PyObject *) PyObject_AS_GC(op); } +#endif + PyObject_FREE(op); } #ifndef WITH_CYCLE_GC |