Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
b1a6a44f
Commit
b1a6a44f
authored
Dec 11, 2014
by
Philip Herron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit DL_IMPORT macro for python3
parent
d5b259c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+7
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
b1a6a44f
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment