Fix test_gc failure by fixing the bug test_gc found: __del__ methods were no

longer preventing classes from being cleaned up by the cycle-gc, after Guido
removed references to PyInstance_*.
This commit is contained in:
Thomas Wouters 2006-08-21 22:15:41 +00:00
parent 2bb5f1d4c0
commit 3dfc3c14a2

View File

@ -411,7 +411,7 @@ has_finalizer(PyObject *op)
if (PyGen_CheckExact(op)) if (PyGen_CheckExact(op))
return PyGen_NeedsFinalizing((PyGenObject *)op); return PyGen_NeedsFinalizing((PyGenObject *)op);
else else
return 0; return op->ob_type->tp_del != NULL;
} }
/* Move the objects in unreachable with __del__ methods into `finalizers`. /* Move the objects in unreachable with __del__ methods into `finalizers`.