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
3508b9e9
Commit
3508b9e9
authored
Aug 15, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix undefined variable 'context' in compile_multiple()
parent
a7c689c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+10
-5
No files found.
Cython/Compiler/Main.py
View file @
3508b9e9
...
@@ -384,10 +384,11 @@ def create_default_resultobj(compilation_source, options):
...
@@ -384,10 +384,11 @@ def create_default_resultobj(compilation_source, options):
result
.
c_file
=
Utils
.
replace_suffix
(
source_desc
.
filename
,
c_suffix
)
result
.
c_file
=
Utils
.
replace_suffix
(
source_desc
.
filename
,
c_suffix
)
return
result
return
result
def
run_pipeline
(
source
,
options
,
full_module_name
=
None
):
def
run_pipeline
(
source
,
options
,
full_module_name
=
None
,
context
=
None
):
import
Pipeline
import
Pipeline
context
=
options
.
create_context
()
if
context
is
None
:
context
=
options
.
create_context
()
# Set up source object
# Set up source object
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
...
@@ -551,16 +552,20 @@ def compile_multiple(sources, options):
...
@@ -551,16 +552,20 @@ def compile_multiple(sources, options):
if
timestamps
is
None
:
if
timestamps
is
None
:
timestamps
=
recursive
timestamps
=
recursive
verbose
=
options
.
verbose
or
((
recursive
or
timestamps
)
and
not
options
.
quiet
)
verbose
=
options
.
verbose
or
((
recursive
or
timestamps
)
and
not
options
.
quiet
)
context
=
None
for
source
in
sources
:
for
source
in
sources
:
if
source
not
in
processed
:
if
source
not
in
processed
:
# Compiling multiple sources in one context doesn't quite
if
context
is
None
:
# work properly yet.
context
=
options
.
create_context
()
if
not
timestamps
or
context
.
c_file_out_of_date
(
source
):
if
not
timestamps
or
context
.
c_file_out_of_date
(
source
):
if
verbose
:
if
verbose
:
sys
.
stderr
.
write
(
"Compiling %s
\
n
"
%
source
)
sys
.
stderr
.
write
(
"Compiling %s
\
n
"
%
source
)
result
=
run_pipeline
(
source
,
options
)
result
=
run_pipeline
(
source
,
options
,
context
=
context
)
results
.
add
(
source
,
result
)
results
.
add
(
source
,
result
)
# Compiling multiple sources in one context doesn't quite
# work properly yet.
context
=
None
processed
.
add
(
source
)
processed
.
add
(
source
)
if
recursive
:
if
recursive
:
for
module_name
in
context
.
find_cimported_module_names
(
source
):
for
module_name
in
context
.
find_cimported_module_names
(
source
):
...
...
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