summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-01-17 19:24:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-01-17 19:24:34 (GMT)
commit67641d25d4b2ba4f49fb597cf81993333e9b0750 (patch)
treea83d7bdf9b872f7b4a50667769decf81cb2e7901 /Objects
parent83a682da305acc8a285dc21d7f826ad2a8ad322b (diff)
downloadcpython-67641d25d4b2ba4f49fb597cf81993333e9b0750.zip
cpython-67641d25d4b2ba4f49fb597cf81993333e9b0750.tar.gz
cpython-67641d25d4b2ba4f49fb597cf81993333e9b0750.tar.bz2
turn some checks into assertions, since they are implied by the caller
Reviewed by Georg.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 87c8723..325b825 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2945,10 +2945,8 @@ same_slots_added(PyTypeObject *a, PyTypeObject *b)
Py_ssize_t size;
PyObject *slots_a, *slots_b;
- if (base != b->tp_base)
- return 0;
- if (equiv_structs(a, base) && equiv_structs(b, base))
- return 1;
+ assert(base == b->tp_base);
+ assert(equiv_structs(a, base) && equiv_structs(b, base));
size = base->tp_basicsize;
if (a->tp_dictoffset == size && b->tp_dictoffset == size)
size += sizeof(PyObject *);