From: Stefan Behnel Date: Wed, 17 Oct 2007 17:52:35 +0000 (+0200) Subject: greg: Fix ishimoto4 - calling convention omitted from func defn X-Git-Tag: 0.9.6.14~29^2~119^2~8 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a39c2fddd44e510f1ea5cca207f2360197ddd39a;p=cython.git greg: Fix ishimoto4 - calling convention omitted from func defn --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index deea3d66..d5bb76ec 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -813,7 +813,7 @@ class CFuncDefNode(FuncDefNode): arg_decls.append("...") if not arg_decls: arg_decls = ["void"] - entity = "%s(%s)" % (self.entry.func_cname, + entity = type.function_header_code(self.entry.func_cname, string.join(arg_decls, ",")) if self.visibility == 'public': dll_linkage = "DL_EXPORT" diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index c95ada92..b7474288 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -648,6 +648,10 @@ class CFuncType(CType): return self.return_type.declaration_code( "%s%s(%s)%s" % (cc, entity_code, arg_decl_code, exc_clause), for_display, dll_linkage, pyrex) + + def function_header_code(self, func_name, arg_code): + return "%s%s(%s)" % (self.calling_convention_prefix(), + func_name, arg_code) def signature_string(self): s = self.declaration_code("")