summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 4315d55..49251cd 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -524,10 +524,7 @@ untrack_dicts(PyGC_Head *head)
static int
has_finalizer(PyObject *op)
{
- if (PyGen_CheckExact(op))
- return PyGen_NeedsFinalizing((PyGenObject *)op);
- else
- return op->ob_type->tp_del != NULL;
+ return op->ob_type->tp_del != NULL;
}
/* Move the objects in unreachable with __del__ methods into `finalizers`.