From aa77044b4a9e104ef52ab8ad693c531dbf567e38 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 8 Feb 2008 00:03:24 -0800 Subject: [PATCH] Allow a cpdef function to override a cdef function (But not the other way around...) --- Cython/Compiler/PyrexTypes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 7ee44433..5aa17d87 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -627,7 +627,7 @@ class CFuncType(CType): return 1 if not other_type.is_cfunction: return 0 - if self.is_overridable != other_type.is_overridable: + if not self.is_overridable and other_type.is_overridable: return 0 nargs = len(self.args) if nargs <> len(other_type.args): @@ -660,7 +660,7 @@ class CFuncType(CType): return 1 if not other_type.is_cfunction: return 0 - if self.is_overridable != other_type.is_overridable: + if not self.is_overridable and other_type.is_overridable: return 0 nargs = len(self.args) if nargs - self.optional_arg_count != len(other_type.args) - other_type.optional_arg_count: -- 2.26.2