[pypy-svn] r53679 - pypy/branch/io-improvements/pypy/rpython/lltypesystem
fijal at codespeak.net
fijal at codespeak.net
Thu Apr 10 21:58:03 CEST 2008
Author: fijal
Date: Thu Apr 10 21:58:02 2008
New Revision: 53679
Modified:
pypy/branch/io-improvements/pypy/rpython/lltypesystem/lltype.py
Log:
equality of FixedSizeArray and Array(hints='nolength:True)
Modified: pypy/branch/io-improvements/pypy/rpython/lltypesystem/lltype.py
==============================================================================
--- pypy/branch/io-improvements/pypy/rpython/lltypesystem/lltype.py (original)
+++ pypy/branch/io-improvements/pypy/rpython/lltypesystem/lltype.py Thu Apr 10 21:58:02 2008
@@ -631,6 +631,14 @@
hints={'interior_ptr_type':True})
return R
+ def __eq__(self, other):
+ if not isinstance(other, Ptr):
+ return False
+ if (_exchangable_arrays(self.TO, other.TO) or
+ _exchangable_arrays(other.TO, self.TO)):
+ return True
+ return LowLevelType.__eq__(self, other)
+
class InteriorPtr(LowLevelType):
def __init__(self, PARENTTYPE, TO, offsets):
self.PARENTTYPE = PARENTTYPE
More information about the Pypy-commit
mailing list