Commit 50aa394d authored by Philip Herron's avatar Philip Herron

Emit DL_IMPORT macro for python3

--HG--
extra : transplant_source : %0Dr%DFY%8A%EF%F6%C1%9C/h%B5%23%CE3_%DCE%B2%03
parent 11f855a8
...@@ -150,6 +150,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -150,6 +150,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
h_code.putln("#ifndef %s" % api_guard) h_code.putln("#ifndef %s" % api_guard)
h_code.putln("") h_code.putln("")
self.generate_extern_c_macro_definition(h_code) self.generate_extern_c_macro_definition(h_code)
h_code.putln("")
self.generate_dl_import_macro(h_code)
if h_extension_types: if h_extension_types:
h_code.putln("") h_code.putln("")
for entry in h_extension_types: for entry in h_extension_types:
...@@ -671,6 +673,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -671,6 +673,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln(" #endif") code.putln(" #endif")
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): def generate_includes(self, env, cimported_modules, code):
includes = [] includes = []
for filename in env.include_files: for filename in env.include_files:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment