[pypy-svn] r52674 - pypy/dist/pypy/rpython/ootypesystem

antocuni at codespeak.net antocuni at codespeak.net
Tue Mar 18 10:07:35 CET 2008


Author: antocuni
Date: Tue Mar 18 10:07:34 2008
New Revision: 52674

Modified:
   pypy/dist/pypy/rpython/ootypesystem/ootype.py
Log:
oups, I forgot to check this is togheter with r52628.



Modified: pypy/dist/pypy/rpython/ootypesystem/ootype.py
==============================================================================
--- pypy/dist/pypy/rpython/ootypesystem/ootype.py	(original)
+++ pypy/dist/pypy/rpython/ootypesystem/ootype.py	Tue Mar 18 10:07:34 2008
@@ -813,8 +813,8 @@
 
     def __init__(self, INSTANCE, inst):
         self.__dict__['_TYPE'] = INSTANCE
-        assert isinstance(inst, _instance)
-        assert isSubclass(inst._TYPE, INSTANCE)
+        assert isinstance(inst, (_instance, _record))
+        assert isinstance(inst._TYPE, Record) or isSubclass(inst._TYPE, INSTANCE)
         self.__dict__['_inst'] = inst
 
     def __repr__(self):
@@ -828,7 +828,9 @@
 
     def __eq__(self, other):
         assert isinstance(other, _view)
-        return self._inst == other._inst
+        a = self._inst
+        b = other._inst
+        return a.__class__ == b.__class__ and a == b
 
     def __hash__(self):
         return hash(self._inst)



More information about the Pypy-commit mailing list