From 8a8e77d1407c9fee729fabdafae681d6d581d277 Mon Sep 17 00:00:00 2001 From: "jek-cythonhg@kleckner.net" Date: Fri, 23 May 2008 17:58:47 -0700 Subject: [PATCH] Emit code to guard declarations for this module's public functions. It appears that the machinery is all there to protect the declaration of inconsistent linkage types (i.e. dllimport vs. dllexport) by using a guard unique to the pyx file. This patch simply emits that guard for the current module to prevent the error "inconsistent linkage types" on a Windows-based system. --- Cython/Compiler/ModuleNode.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 5f8fcd97..1fb70945 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -473,6 +473,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("#endif") self.generate_extern_c_macro_definition(code) code.putln("#include ") + code.putln("#define %s" % Naming.api_guard_prefix + self.api_name(env)) self.generate_includes(env, cimported_modules, code) code.putln('') code.put(Nodes.utility_function_predeclarations) -- 2.26.2