mirror of
https://github.com/python/cpython.git
synced 2024-11-28 20:33:54 +08: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 New Issue
Block a user