diff options
author | Philip Herron <philip.herron@instil.co> | 2014-12-11 13:31:26 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@instil.co> | 2014-12-11 13:32:15 +0000 |
commit | b1a6a44f1533b07fe34883d7077cd9ead2044045 (patch) | |
tree | 20ec1f25981111c535218dc935d77ba13bf64245 /Cython/Compiler/ModuleNode.py | |
parent | d5b259c53cd895ae72321a86248537ac75ad0f58 (diff) | |
download | cython-b1a6a44f1533b07fe34883d7077cd9ead2044045.tar.gz |
Emit DL_IMPORT macro for python3
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 560acc1b8..5edc321ff 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -150,6 +150,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): h_code.putln("#ifndef %s" % api_guard) h_code.putln("") self.generate_extern_c_macro_definition(h_code) + h_code.putln("") + self.generate_dl_import_macro(h_code) if h_extension_types: h_code.putln("") for entry in h_extension_types: @@ -671,6 +673,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln(" #endif") code.putln("#endif") + def generate_dl_import_macro(self, code): + code.putln("#ifndef DL_IMPORT") + code.putln(" #define DL_IMPORT(_T) _T") + code.putln("#endif") + def generate_includes(self, env, cimported_modules, code): includes = [] for filename in env.include_files: |