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
397c1d1e
Commit
397c1d1e
authored
Oct 03, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for embed and freeze which were broken by #216.
parent
6b86bb18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+8
-7
No files found.
Cython/Compiler/ModuleNode.py
View file @
397c1d1e
...
@@ -1678,6 +1678,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1678,6 +1678,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"/*--- Initialize various global constants etc. ---*/"
)
code
.
putln
(
"/*--- Initialize various global constants etc. ---*/"
)
code
.
putln
(
code
.
error_goto_if_neg
(
"__Pyx_InitGlobals()"
,
self
.
pos
))
code
.
putln
(
code
.
error_goto_if_neg
(
"__Pyx_InitGlobals()"
,
self
.
pos
))
code
.
putln
(
"if (%s%s) {"
%
(
Naming
.
module_is_main
,
self
.
full_module_name
.
replace
(
'.'
,
'__'
)))
code
.
putln
(
'if (__Pyx_SetAttrString(%s, "__name__", %s) < 0) %s;'
%
(
env
.
module_cname
,
self
.
__main__cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
"}"
)
if
Options
.
cache_builtins
:
if
Options
.
cache_builtins
:
code
.
putln
(
"/*--- Builtin init code ---*/"
)
code
.
putln
(
"/*--- Builtin init code ---*/"
)
code
.
putln
(
code
.
error_goto_if_neg
(
"__Pyx_InitCachedBuiltins()"
,
code
.
putln
(
code
.
error_goto_if_neg
(
"__Pyx_InitCachedBuiltins()"
,
...
@@ -1855,13 +1863,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1855,13 +1863,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env
.
module_cname
,
env
.
module_cname
,
Naming
.
builtins_cname
,
Naming
.
builtins_cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
"if (%s%s) {"
%
(
Naming
.
module_is_main
,
self
.
full_module_name
.
replace
(
'.'
,
'__'
)))
code
.
putln
(
'if (__Pyx_SetAttrString(%s, "__name__", %s) < 0) %s;'
%
(
env
.
module_cname
,
self
.
__main__cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
"}"
)
if
Options
.
pre_import
is
not
None
:
if
Options
.
pre_import
is
not
None
:
code
.
putln
(
code
.
putln
(
'%s = PyImport_AddModule(__Pyx_NAMESTR("%s"));'
%
(
'%s = PyImport_AddModule(__Pyx_NAMESTR("%s"));'
%
(
...
...
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