From a39c2fddd44e510f1ea5cca207f2360197ddd39a Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 17 Oct 2007 19:52:35 +0200 Subject: [PATCH] greg: Fix ishimoto4 - calling convention omitted from func defn --- Cython/Compiler/Nodes.py | 2 +- Cython/Compiler/PyrexTypes.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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("") -- 2.26.2