summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-12-13 23:27:56 -0800
committerBenjamin Peterson <benjamin@python.org>2016-12-13 23:27:56 -0800
commit222befc25f7967503a5aa16c7600a02c6d93975e (patch)
tree6f6525d353f594d3b5ed138258d853957fe2b42c
parentce7a67648eb5c53b17a7d4befa5cbbda8e876177 (diff)
downloadcpython-222befc25f7967503a5aa16c7600a02c6d93975e.tar.gz
Backed out changeset ea904d4b3634
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 30da5db8ac..169a23fe84 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6314,12 +6314,12 @@ update_one_slot(PyTypeObject *type, slotdef *p)
specific = (void *)slot_tp_new;
}
else {
- PyTypeObject *staticbase = type->tp_base;
specific = ((PyTypeObject *)self)->tp_new;
/* Check that the user does not do anything
silly and unsafe like object.__new__(dict).
To do this, we check that the most derived
base that's not a heap type is this type. */
+ PyTypeObject *staticbase = type->tp_base;
while (staticbase &&
(staticbase->tp_flags & Py_TPFLAGS_HEAPTYPE))
staticbase = staticbase->tp_base;