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

fijal at codespeak.net fijal at codespeak.net
Sat Jun 16 16:09:46 CEST 2007


Author: fijal
Date: Sat Jun 16 16:09:46 2007
New Revision: 44306

Modified:
   pypy/dist/pypy/rpython/ootypesystem/bltregistry.py
Log:
Add a comparison by _class_ - need to grow to sth else (keeping
ExternalTypeDesc in a bookkeeper), leave it like that for now.


Modified: pypy/dist/pypy/rpython/ootypesystem/bltregistry.py
==============================================================================
--- pypy/dist/pypy/rpython/ootypesystem/bltregistry.py	(original)
+++ pypy/dist/pypy/rpython/ootypesystem/bltregistry.py	Sat Jun 16 16:09:46 2007
@@ -100,6 +100,14 @@
         self.s_retval = s_retval
         self.s_args = s_args
         self.value = value
+
+
+    def __ne__(self, other):
+        return not (self == other)
+
+    def __eq__(self, other):
+        return (self.__class__ is other.__class__ and
+                self.__dict__  == other.__dict__)
     
     def __call__(self, *args):
         args = args[1:]
@@ -130,6 +138,11 @@
     def _is_compatible(type2):
         return type(type2) is ExternalType
     
+
+    def __eq__(self, other):
+        return self.__class__ is other.__class__ and \
+               self._class_ is other._class_
+
     _is_compatible = staticmethod(_is_compatible)
     
     def update_methods(self, _methods):



More information about the Pypy-commit mailing list