summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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`.