From efb47ac78e94a7bb8c5605e0f8211036a600ab0c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 7 Jul 2007 01:56:57 -0700 Subject: [PATCH] sagex_multi_file.patch from Joel Mohler (sane cross-file type cmp) --- Cython/Compiler/PyrexTypes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 1cad0735..17ae138e 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -618,6 +618,15 @@ class CStructOrUnionType(CType): base = "%s %s" % (self.kind, self.cname) return "%s %s" % (public_decl(base, dll_linkage), entity_code) + def __cmp__(self, other): + try: + if self.name == other.name: + return 0 + else: + return 1 + except AttributeError: + return 1 + def is_complete(self): return self.scope is not None -- 2.26.2