summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-01-17 19:30:29 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-01-17 19:30:29 (GMT)
commitcf94b8b4da11245baec45a27153804c9f70382f0 (patch)
tree0cd37f7f113475f3a2a4268fb6b36913b449825a
parent97b68126f271f9bed7e90ab54446054e5c86ced5 (diff)
downloadcpython-cf94b8b4da11245baec45a27153804c9f70382f0.zip
cpython-cf94b8b4da11245baec45a27153804c9f70382f0.tar.gz
cpython-cf94b8b4da11245baec45a27153804c9f70382f0.tar.bz2
Merged revisions 88063 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88063 | benjamin.peterson | 2011-01-17 13:24:34 -0600 (Mon, 17 Jan 2011) | 4 lines turn some checks into assertions, since they are implied by the caller Reviewed by Georg. ........
-rw-r--r--Objects/typeobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 394b962..baf62ab 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3011,10 +3011,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 *);