From: Stefan Behnel Date: Mon, 8 Nov 2010 09:14:32 +0000 (+0100) Subject: trial fix for ticket #583: method signatures of overridden C methods in pure mode X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=24e2ac270bb001647ecfcdba8c3d1c9013721581;p=cython.git trial fix for ticket #583: method signatures of overridden C methods in pure mode --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index c6062ec1..92276775 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -1559,7 +1559,8 @@ class CClassScope(ClassScope): error(pos, "'%s' already defined" % name) #print "CClassScope.declare_cfunction: checking signature" ### if type.same_c_signature_as(entry.type, as_cmethod = 1) and type.nogil == entry.type.nogil: - pass + # may still need to adjust the type of 'self' => simply override the type + entry.type = type elif type.compatible_signature_with(entry.type, as_cmethod = 1) and type.nogil == entry.type.nogil: entry = self.add_cfunction(name, type, pos, cname or name, visibility='ignore', modifiers=modifiers) defining = 1