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
34f6211d
Commit
34f6211d
authored
Sep 14, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not reject invalid module names when embedding - the result may still be executable
parent
6b1b8ed9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+2
-2
Cython/Compiler/Pipeline.py
Cython/Compiler/Pipeline.py
+2
-1
No files found.
Cython/Compiler/Main.py
View file @
34f6211d
...
...
@@ -116,7 +116,7 @@ class Context(object):
return
Errors
.
report_error
(
exc
)
def
find_module
(
self
,
module_name
,
relative_to
=
None
,
pos
=
None
,
need_pxd
=
1
):
relative_to
=
None
,
pos
=
None
,
need_pxd
=
1
,
check_module_name
=
True
):
# Finds and returns the module scope corresponding to
# the given relative or absolute module name. If this
# is the first time the module has been requested, finds
...
...
@@ -131,7 +131,7 @@ class Context(object):
scope
=
None
pxd_pathname
=
None
if
not
module_name_pattern
.
match
(
module_name
):
if
check_module_name
and
not
module_name_pattern
.
match
(
module_name
):
if
pos
is
None
:
pos
=
(
module_name
,
0
,
0
)
raise
CompileError
(
pos
,
...
...
Cython/Compiler/Pipeline.py
View file @
34f6211d
...
...
@@ -26,7 +26,8 @@ def parse_stage_factory(context):
full_module_name
=
compsrc
.
full_module_name
initial_pos
=
(
source_desc
,
1
,
0
)
saved_cimport_from_pyx
,
Options
.
cimport_from_pyx
=
Options
.
cimport_from_pyx
,
False
scope
=
context
.
find_module
(
full_module_name
,
pos
=
initial_pos
,
need_pxd
=
0
)
scope
=
context
.
find_module
(
full_module_name
,
pos
=
initial_pos
,
need_pxd
=
0
,
check_module_name
=
not
Options
.
embed
)
Options
.
cimport_from_pyx
=
saved_cimport_from_pyx
tree
=
context
.
parse
(
source_desc
,
scope
,
pxd
=
0
,
full_module_name
=
full_module_name
)
tree
.
compilation_source
=
compsrc
...
...
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