Author: Brian Kearns <[email protected]>
Branch:
Changeset: r67592:cd2a4dd3979a
Date: 2013-10-24 22:59 -0400
http://bitbucket.org/pypy/pypy/changeset/cd2a4dd3979a/
Log: back out 72c1e31475e9 and d1ee8abf66b0 to fix breakage
diff --git a/rpython/rtyper/lltypesystem/lltype.py
b/rpython/rtyper/lltypesystem/lltype.py
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -97,16 +97,8 @@
def __eq__(self, other):
if isinstance(other, Typedef):
return other.__eq__(self)
- if self.__class__ is other.__class__:
- if self is other:
- return True
- try:
- if hash(self) != hash(other):
- return False
- except TypeError:
- pass # too bad, we can't use a fastpath here
- return safe_equal(self.__dict__, other.__dict__)
- return False
+ return self.__class__ is other.__class__ and (
+ self is other or safe_equal(self.__dict__, other.__dict__))
def __ne__(self, other):
return not (self == other)
@@ -235,9 +227,6 @@
self.OF = OF
self.c_name = c_name
- def __hash__(self):
- return hash(self.OF)
-
def __repr__(self):
return '<Typedef "%s" of %r>' % (self.c_name, self.OF)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit