[Python-checkins] r88065 - in python/branches/release31-maint: Objects/typeobject.c

benjamin.peterson python-checkins at python.org
Mon Jan 17 20:36:44 CET 2011


Author: benjamin.peterson
Date: Mon Jan 17 20:36:44 2011
New Revision: 88065

Log:
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.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Objects/typeobject.c

Modified: python/branches/release31-maint/Objects/typeobject.c
==============================================================================
--- python/branches/release31-maint/Objects/typeobject.c	(original)
+++ python/branches/release31-maint/Objects/typeobject.c	Mon Jan 17 20:36:44 2011
@@ -2897,10 +2897,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 *);


More information about the Python-checkins mailing list