From 0b1b435efd9abc561504c38499e9e4d0cf149a55 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 14 Oct 2009 22:34:58 -0700 Subject: [PATCH] Fix error in hashing partially-declared types. --- Cython/Compiler/PyrexTypes.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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 -- 2.26.2