Mercurial > cpython-lru_cache-weakref
diff Objects/typeobject.c @ 67645:3674dcb41a94
turn some checks into assertions, since they are implied by the caller
Reviewed by Georg.
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 17 Jan 2011 19:24:34 +0000 |
| parents | aeccbd16970f |
| children | df8b6a2bdddd |
line wrap: on
line diff
--- a/Objects/typeobject.c Sun Jan 16 21:02:09 2011 +0000 +++ b/Objects/typeobject.c Mon Jan 17 19:24:34 2011 +0000 @@ -2945,10 +2945,8 @@ 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 *);
