[pypy-svn] r53681 - pypy/branch/io-improvements/pypy/rpython/lltypesystem

fijal at codespeak.net fijal at codespeak.net
Thu Apr 10 23:51:15 CEST 2008


Author: fijal
Date: Thu Apr 10 23:51:12 2008
New Revision: 53681

Modified:
   pypy/branch/io-improvements/pypy/rpython/lltypesystem/lltype.py
Log:
Revert those changes, they made no sense whatsoever.


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 23:51:12 2008
@@ -631,14 +631,6 @@
                          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
@@ -770,12 +762,6 @@
         OUTSIDE = getattr(OUTSIDE, first)
     return -1
 
-def _exchangable_arrays(ONE, TWO):
-    if (isinstance(ONE, FixedSizeArray) and isinstance(TWO, Array) and
-        TWO._hints['nolength']):
-        return True
-    return False
-
 def castable(PTRTYPE, CURTYPE):
     if CURTYPE.TO._gckind != PTRTYPE.TO._gckind:
         raise TypeError("cast_pointer() cannot change the gc status: %s to %s"



More information about the Pypy-commit mailing list