diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/object.c b/Objects/object.c index 87dba98..f9c75b7 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -298,10 +298,7 @@ PyObject_CallFinalizer(PyObject *self) { PyTypeObject *tp = Py_TYPE(self); - /* The former could happen on heaptypes created from the C API, e.g. - PyType_FromSpec(). */ - if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_FINALIZE) || - tp->tp_finalize == NULL) + if (tp->tp_finalize == NULL) return; /* tp_finalize should only be called once. */ if (PyType_IS_GC(tp) && _PyGC_FINALIZED(self)) |