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
63c226f8
Commit
63c226f8
authored
Oct 04, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merged '--embed' fix from cython-devel
parents
19f7caa7
c6661c76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
21 deletions
+11
-21
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+0
-3
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+10
-13
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-5
No files found.
Cython/Compiler/ExprNodes.py
View file @
63c226f8
...
...
@@ -2348,9 +2348,6 @@ class SimpleCallNode(CallNode):
arg_list_code
.
append
(
actual_arg
.
result
())
result
=
"%s(%s)"
%
(
self
.
function
.
result
(),
', '
.
join
(
arg_list_code
))
# if self.wrapper_call or \
# self.function.entry.is_unbound_cmethod and self.function.entry.type.is_overridable:
# result = "(%s = 1, %s)" % (Naming.skip_dispatch_cname, result)
return
result
def
generate_result_code
(
self
,
code
):
...
...
Cython/Compiler/ModuleNode.py
View file @
63c226f8
...
...
@@ -1668,13 +1668,21 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"/*--- Initialize various global constants etc. ---*/"
)
code
.
putln
(
code
.
error_goto_if_neg
(
"__Pyx_InitGlobals()"
,
self
.
pos
))
__main__name
=
code
.
globalstate
.
get_py_string_const
(
EncodedString
(
"__main__"
),
identifier
=
True
)
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
,
__main__name
.
cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
"}"
)
if
Options
.
cache_builtins
:
code
.
putln
(
"/*--- Builtin init code ---*/"
)
code
.
putln
(
code
.
error_goto_if_neg
(
"__Pyx_InitCachedBuiltins()"
,
self
.
pos
))
code
.
putln
(
"%s = 0;"
%
Naming
.
skip_dispatch_cname
);
code
.
putln
(
"/*--- Global init code ---*/"
)
self
.
generate_global_init_code
(
env
,
code
)
...
...
@@ -1840,17 +1848,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env
.
module_cname
,
Naming
.
builtins_cname
,
code
.
error_goto
(
self
.
pos
)))
__main__name
=
code
.
globalstate
.
get_py_string_const
(
EncodedString
(
"__main__"
),
identifier
=
True
)
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
,
__main__name
.
cname
,
code
.
error_goto
(
self
.
pos
)))
code
.
putln
(
"}"
)
if
Options
.
pre_import
is
not
None
:
code
.
putln
(
'%s = PyImport_AddModule(__Pyx_NAMESTR("%s"));'
%
(
...
...
Cython/Compiler/Nodes.py
View file @
63c226f8
...
...
@@ -4746,11 +4746,7 @@ utility_function_predeclarations = \
typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
"""
+
"""
static int %(skip_dispatch_cname)s = 0;
"""
%
{
'skip_dispatch_cname'
:
Naming
.
skip_dispatch_cname
}
"""
if
Options
.
gcc_branch_hints
:
branch_prediction_macros
=
\
...
...
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