[pypy-svn] r63745 - pypy/branch/pyjitpl5-simplify/pypy/rpython/lltypesystem

fijal at codespeak.net fijal at codespeak.net
Mon Apr 6 22:45:56 CEST 2009


Author: fijal
Date: Mon Apr  6 22:45:55 2009
New Revision: 63745

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/rpython/lltypesystem/lltype.py
Log:
a pretty delicate fix. I *think* it's ok to check for equality here, fixes
ll2ctypes to some extend.


Modified: pypy/branch/pyjitpl5-simplify/pypy/rpython/lltypesystem/lltype.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/rpython/lltypesystem/lltype.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/rpython/lltypesystem/lltype.py	Mon Apr  6 22:45:55 2009
@@ -1163,7 +1163,7 @@
             if parent is None:
                 raise RuntimeError("widening to trash: %r" % self)
             PARENTTYPE = struc._parent_type
-            if getattr(parent, PARENTTYPE._names[0]) is not struc:
+            if getattr(parent, PARENTTYPE._names[0]) != struc:
                 raise InvalidCast(CURTYPE, PTRTYPE) # xxx different exception perhaps?
             struc = parent
             u -= 1



More information about the Pypy-commit mailing list