Kaydet (Commit) acd17591 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

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.
........
üst 1f3fa045
...@@ -2897,10 +2897,8 @@ same_slots_added(PyTypeObject *a, PyTypeObject *b) ...@@ -2897,10 +2897,8 @@ same_slots_added(PyTypeObject *a, PyTypeObject *b)
Py_ssize_t size; Py_ssize_t size;
PyObject *slots_a, *slots_b; PyObject *slots_a, *slots_b;
if (base != b->tp_base) assert(base == b->tp_base);
return 0; assert(equiv_structs(a, base) && equiv_structs(b, base));
if (equiv_structs(a, base) && equiv_structs(b, base))
return 1;
size = base->tp_basicsize; size = base->tp_basicsize;
if (a->tp_dictoffset == size && b->tp_dictoffset == size) if (a->tp_dictoffset == size && b->tp_dictoffset == size)
size += sizeof(PyObject *); size += sizeof(PyObject *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment