summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorAntoine Pitrou <antoine@python.org>2019-05-29 20:12:38 (GMT)
committerGitHub <noreply@github.com>2019-05-29 20:12:38 (GMT)
commitada319bb6d0ebcc68d3e0ef2b4279ea061877ac8 (patch)
treee908340371be04bce6b7676fd5f034aff3591a4a /Objects/object.c
parent43fdbd2729cb7cdbb5afb5d16352f6604859e564 (diff)
downloadcpython-ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8.zip
cpython-ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8.tar.gz
cpython-ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8.tar.bz2
bpo-32388: Remove cross-version binary compatibility requirement in tp_flags (GH-4944)
It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags. This will reduce the risk of running out of bits in the 32-bit tp_flags value.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c5
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))