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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
12148662
Commit
12148662
authored
Jan 12, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pkg_init_windows'
parents
1c6ab8b7
b43bf135
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+9
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
12148662
...
...
@@ -2297,9 +2297,18 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"#if PY_MAJOR_VERSION < 3"
)
# Optimise for small code size as the module init function is only executed once.
code
.
putln
(
"%s CYTHON_SMALL_CODE; /*proto*/"
%
header2
)
if
self
.
scope
.
is_package
:
code
.
putln
(
"#if !defined(CYTHON_NO_PYINIT_EXPORT) && (defined(WIN32) || defined(MS_WINDOWS))"
)
code
.
putln
(
"__Pyx_PyMODINIT_FUNC init__init__(void) { init%s(); };"
%
env
.
module_name
)
code
.
putln
(
"#endif"
)
code
.
putln
(
header2
)
code
.
putln
(
"#else"
)
code
.
putln
(
"%s CYTHON_SMALL_CODE; /*proto*/"
%
header3
)
if
self
.
scope
.
is_package
:
code
.
putln
(
"#if !defined(CYTHON_NO_PYINIT_EXPORT) && (defined(WIN32) || defined(MS_WINDOWS))"
)
code
.
putln
(
"__Pyx_PyMODINIT_FUNC PyInit___init__(void) { return %s(); };"
%
(
self
.
mod_init_func_cname
(
'PyInit'
,
env
)))
code
.
putln
(
"#endif"
)
code
.
putln
(
header3
)
# CPython 3.5+ supports multi-phase module initialisation (gives access to __spec__, __file__, etc.)
...
...
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