[Python-checkins] cpython (2.7): declarations to the top of the block
benjamin.peterson
python-checkins at python.org
Fri Dec 2 03:02:30 EST 2016
https://hg.python.org/cpython/rev/ea904d4b3634
changeset: 105414:ea904d4b3634
branch: 2.7
user: Benjamin Peterson <benjamin at python.org>
date: Fri Dec 02 00:02:24 2016 -0800
summary:
declarations to the top of the block
files:
Objects/typeobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6314,12 +6314,12 @@
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;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list