Skip to content

Commit

Permalink
Fix test_gc failure by fixing the bug test_gc found: __del__ methods …
Browse files Browse the repository at this point in the history
…were no

longer preventing classes from being cleaned up by the cycle-gc, after Guido
removed references to PyInstance_*.
  • Loading branch information
Yhg1s committed Aug 21, 2006
1 parent 2bb5f1d commit 3dfc3c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ has_finalizer(PyObject *op)
if (PyGen_CheckExact(op))
return PyGen_NeedsFinalizing((PyGenObject *)op);
else
return 0;
return op->ob_type->tp_del != NULL;
}

/* Move the objects in unreachable with __del__ methods into `finalizers`.
Expand Down

0 comments on commit 3dfc3c1

Please sign in to comment.