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
Boxiang Sun
cython
Commits
4305ac87
Commit
4305ac87
authored
Apr 15, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add warning in situations where command line directive behaviour will change in 0.12
parent
445b3458
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+8
-1
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
4305ac87
...
@@ -332,13 +332,20 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
...
@@ -332,13 +332,20 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
def
__init__
(
self
,
context
,
compilation_option_overrides
):
def
__init__
(
self
,
context
,
compilation_option_overrides
):
super
(
InterpretCompilerDirectives
,
self
).
__init__
(
context
)
super
(
InterpretCompilerDirectives
,
self
).
__init__
(
context
)
self
.
compilation_option_overrides
=
compilation_option_overrides
self
.
compilation_option_overrides
=
{}
for
key
,
value
in
compilation_option_overrides
.
iteritems
():
self
.
compilation_option_overrides
[
unicode
(
key
)]
=
value
self
.
cython_module_names
=
set
()
self
.
cython_module_names
=
set
()
self
.
option_names
=
{}
self
.
option_names
=
{}
# Set up processing and handle the cython: comments.
# Set up processing and handle the cython: comments.
def
visit_ModuleNode
(
self
,
node
):
def
visit_ModuleNode
(
self
,
node
):
options
=
copy
.
copy
(
Options
.
option_defaults
)
options
=
copy
.
copy
(
Options
.
option_defaults
)
for
key
,
value
in
self
.
compilation_option_overrides
.
iteritems
():
if
key
in
node
.
option_comments
and
node
.
option_comments
[
key
]
!=
value
:
warning
(
node
.
pos
,
"Compiler directive differs between environment and file header; this will change "
"in Cython 0.12. See http://article.gmane.org/gmane.comp.python.cython.devel/5233"
,
2
)
break
options
.
update
(
node
.
option_comments
)
options
.
update
(
node
.
option_comments
)
options
.
update
(
self
.
compilation_option_overrides
)
options
.
update
(
self
.
compilation_option_overrides
)
self
.
options
=
options
self
.
options
=
options
...
...
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