From: Robert Bradshaw Date: Fri, 8 Feb 2008 08:03:24 +0000 (-0800) Subject: Allow a cpdef function to override a cdef function X-Git-Tag: 0.9.6.14~29^2~40 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=aa77044b4a9e104ef52ab8ad693c531dbf567e38;p=cython.git Allow a cpdef function to override a cdef function (But not the other way around...) --- 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: