mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
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:
parent
2bb5f1d4c0
commit
3dfc3c14a2
|
@ -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`.
|
||||
|
|
Loading…
Reference in a new issue