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
06695a0e
Commit
06695a0e
authored
May 04, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix embedding (cython-unstable allocates string constants at code-gen time)
parent
cd3a0429
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+3
-3
No files found.
Cython/Compiler/ModuleNode.py
View file @
06695a0e
...
@@ -55,8 +55,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -55,8 +55,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
else
:
else
:
env
.
doc
=
self
.
doc
env
.
doc
=
self
.
doc
env
.
directives
=
self
.
directives
env
.
directives
=
self
.
directives
if
Options
.
embed
:
self
.
__main__cname
=
env
.
intern_identifier
(
EncodedString
(
"__main__"
))
self
.
body
.
analyse_declarations
(
env
)
self
.
body
.
analyse_declarations
(
env
)
def
process_implementation
(
self
,
options
,
result
):
def
process_implementation
(
self
,
options
,
result
):
...
@@ -1808,10 +1806,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1808,10 +1806,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
Naming
.
builtins_cname
,
Naming
.
builtins_cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
error_goto
(
self
.
pos
)))
if
Options
.
embed
:
if
Options
.
embed
:
__main__cname
=
code
.
globalstate
.
get_py_string_const
(
EncodedString
(
"__main__"
),
identifier
=
True
)
code
.
putln
(
code
.
putln
(
'if (__Pyx_SetAttrString(%s, "__name__", %s) < 0) %s;'
%
(
'if (__Pyx_SetAttrString(%s, "__name__", %s) < 0) %s;'
%
(
env
.
module_cname
,
env
.
module_cname
,
self
.
__main__cname
,
__main__cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
error_goto
(
self
.
pos
)))
if
Options
.
pre_import
is
not
None
:
if
Options
.
pre_import
is
not
None
:
code
.
putln
(
code
.
putln
(
...
...
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