Commit 0b1b435e authored by Robert Bradshaw's avatar Robert Bradshaw

Fix error in hashing partially-declared types.

parent f6f1ab0d
...@@ -1590,12 +1590,7 @@ class CStructOrUnionType(CType): ...@@ -1590,12 +1590,7 @@ class CStructOrUnionType(CType):
return False return False
def __hash__(self): def __hash__(self):
try: return hash(self.cname) ^ hash(self.kind)
return self.__hashval
except AttributeError:
hashval = self.__hashval = hash(self.cname) ^ (sum([
hash(field.name) for field in self.scope.var_entries]) % 0xffff)
return hashval
def is_complete(self): def is_complete(self):
return self.scope is not None return self.scope is not None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment