Apply the same string fix to the LinkageMapMachO... this situation starts to become...
authorFabian Groffen <grobian@gentoo.org>
Sun, 24 Aug 2008 17:47:09 +0000 (17:47 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 24 Aug 2008 17:47:09 +0000 (17:47 -0000)
svn path=/main/branches/prefix/; revision=11469

pym/portage/dbapi/vartree.py

index c1aba2a9c5bb6cbf32ca7d41089e97391940c021..92eb1134cedd729757c0097dd17ecc743d4db1f4 100644 (file)
@@ -610,6 +610,8 @@ class LinkageMapMachO(object):
 
                """Helper class used as _obj_properties keys for objects."""
 
+               __slots__ = ("__weakref__", "_key")
+
                def __init__(self, object):
                        """
                        This takes a path to an object.
@@ -624,7 +626,11 @@ class LinkageMapMachO(object):
                        return hash(self._key)
 
                def __eq__(self, other):
-                       return self._key == other._key
+                       if isinstance(other, self.__class__):
+                               other_key = other._key
+                       else:
+                               other_key = other
+                       return self._key == other_key
 
                def _generate_object_key(self, object):
                        """