mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue