Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 13265:e8bb0d536633 legacy-trunk
Neil Schemenauer: small fixes for GC
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sat, 01 Jul 2000 01:00:38 +0000 |
| parents | 87ee82e5c56d |
| children | e38be8717ec0 |
line wrap: on
line diff
--- a/Objects/object.c Sat Jul 01 00:51:51 2000 +0000 +++ b/Objects/object.c Sat Jul 01 01:00:38 2000 +0000 @@ -171,14 +171,11 @@ PyObject *op; { #ifdef WITH_CYCLE_GC - if (PyType_IS_GC(op->ob_type)) { - PyGC_Head *g = PyObject_AS_GC(op); - PyObject_FREE(g); - } else + if (op && PyType_IS_GC(op->ob_type)) { + op = (PyObject *) PyObject_AS_GC(op); + } #endif - { - PyObject_FREE(op); - } + PyObject_FREE(op); } #ifndef WITH_CYCLE_GC
