From: Robert Bradshaw Date: Thu, 15 Oct 2009 05:34:58 +0000 (-0700) Subject: Fix error in hashing partially-declared types. X-Git-Tag: 0.13.beta0~2^2~121^2~55 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b1b435efd9abc561504c38499e9e4d0cf149a55;p=cython.git Fix error in hashing partially-declared types. --- diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index f6474f85..7453f943 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -1590,12 +1590,7 @@ class CStructOrUnionType(CType): return False def __hash__(self): - try: - 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 + return hash(self.cname) ^ hash(self.kind) def is_complete(self): return self.scope is not None