summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-08-21 22:15:41 (GMT)
committerThomas Wouters <thomas@python.org>2006-08-21 22:15:41 (GMT)
commit3dfc3c14a20de3c35262e2e798159f7a64611437 (patch)
treef5e1690b03e4894e3f799cfb11698cc6db4ff1ff /Modules/gcmodule.c
parent2bb5f1d4c0af2e4fd335757a44c0b8cd99388ff6 (diff)
downloadcpython-3dfc3c14a20de3c35262e2e798159f7a64611437.zip
cpython-3dfc3c14a20de3c35262e2e798159f7a64611437.tar.gz
cpython-3dfc3c14a20de3c35262e2e798159f7a64611437.tar.bz2
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_*.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 5c2f381..99f2897 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -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`.