From: Robert Bradshaw Date: Wed, 11 Jun 2008 22:12:23 +0000 (-0700) Subject: Fix e_nogilcmeth X-Git-Tag: 0.9.8rc1~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6f457b91753e2b2edd78ddccac73bed1bc0102a9;p=cython.git Fix e_nogilcmeth --- diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 092d2536..a8ff7980 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -699,6 +699,8 @@ class CFuncType(CType): return 0 if not self.same_calling_convention_as(other_type): return 0 + if self.nogil != other_type.nogil: + return 0 return 1 def compatible_signature_with(self, other_type, as_cmethod = 0): @@ -731,6 +733,8 @@ class CFuncType(CType): return 0 if not self.same_calling_convention_as(other_type): return 0 + if self.nogil != other_type.nogil: + return 0 self.original_sig = other_type.original_sig or other_type if as_cmethod: self.args[0] = other_type.args[0] diff --git a/tests/errors/e_nogilcmeth.pxd b/tests/errors/e_nogilcmeth.pxd new file mode 100644 index 00000000..08b821c9 --- /dev/null +++ b/tests/errors/e_nogilcmeth.pxd @@ -0,0 +1,2 @@ +cdef class C: + cdef void f(self) diff --git a/tests/errors/e_nogilcmeth.pyx b/tests/errors/e_nogilcmeth.pyx index 2efdbcca..6cd96217 100644 --- a/tests/errors/e_nogilcmeth.pyx +++ b/tests/errors/e_nogilcmeth.pyx @@ -1,8 +1,8 @@ cdef class C: - cdef void f(self): + cdef void f(self) nogil: pass _ERRORS = u""" -/Local/Projects/D/Pyrex/Source/Tests/Errors3/e_nogilcmeth.pyx:2:6: Signature does not match previous declaration +/Local/Projects/D/Pyrex/Source/Tests/Errors3/e_nogilcmeth.pyx:2:6: Signature not compatible with previous declaration /Local/Projects/D/Pyrex/Source/Tests/Errors3/e_nogilcmeth.pxd:2:12: Previous declaration is here """