summaryrefslogtreecommitdiff
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 38494ead3f..db9dd3268c 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -413,10 +413,8 @@ has_finalizer(PyObject *op)
assert(delstr != NULL);
return _PyInstance_Lookup(op, delstr) != NULL;
}
- else if (PyType_HasFeature(op->ob_type, Py_TPFLAGS_HEAPTYPE))
+ else
return op->ob_type->tp_del != NULL;
- else
- return 0;
}
/* Move the objects in unreachable with __del__ methods into `finalizers`.