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
0ee7c0c9
Commit
0ee7c0c9
authored
Jun 27, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename pragma => directive in source
parent
daa3f7f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+1
-1
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+6
-6
No files found.
Cython/Compiler/CmdLine.py
View file @
0ee7c0c9
...
@@ -126,7 +126,7 @@ def parse_command_line(args):
...
@@ -126,7 +126,7 @@ def parse_command_line(args):
options
.
emit_linenums
=
True
options
.
emit_linenums
=
True
elif
option
in
(
"-X"
,
"--directive"
):
elif
option
in
(
"-X"
,
"--directive"
):
try
:
try
:
options
.
pragma_overrid
es
=
Options
.
parse_option_list
(
pop_arg
())
options
.
compiler_directiv
es
=
Options
.
parse_option_list
(
pop_arg
())
except
ValueError
,
e
:
except
ValueError
,
e
:
sys
.
stderr
.
write
(
"Error in compiler directive: %s
\
n
"
%
e
.
message
)
sys
.
stderr
.
write
(
"Error in compiler directive: %s
\
n
"
%
e
.
message
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
...
Cython/Compiler/Main.py
View file @
0ee7c0c9
...
@@ -60,14 +60,14 @@ class Context(object):
...
@@ -60,14 +60,14 @@ class Context(object):
# include_directories [string]
# include_directories [string]
# future_directives [object]
# future_directives [object]
def
__init__
(
self
,
include_directories
,
pragma_overrid
es
):
def
__init__
(
self
,
include_directories
,
compiler_directiv
es
):
#self.modules = {"__builtin__" : BuiltinScope()}
#self.modules = {"__builtin__" : BuiltinScope()}
import
Builtin
,
CythonScope
import
Builtin
,
CythonScope
self
.
modules
=
{
"__builtin__"
:
Builtin
.
builtin_scope
}
self
.
modules
=
{
"__builtin__"
:
Builtin
.
builtin_scope
}
self
.
modules
[
"cython"
]
=
CythonScope
.
create_cython_scope
(
self
)
self
.
modules
[
"cython"
]
=
CythonScope
.
create_cython_scope
(
self
)
self
.
include_directories
=
include_directories
self
.
include_directories
=
include_directories
self
.
future_directives
=
set
()
self
.
future_directives
=
set
()
self
.
pragma_overrides
=
pragma_overrid
es
self
.
compiler_directives
=
compiler_directiv
es
self
.
pxds
=
{}
# full name -> node tree
self
.
pxds
=
{}
# full name -> node tree
...
@@ -113,7 +113,7 @@ class Context(object):
...
@@ -113,7 +113,7 @@ class Context(object):
NormalizeTree
(
self
),
NormalizeTree
(
self
),
PostParse
(
self
),
PostParse
(
self
),
_specific_post_parse
,
_specific_post_parse
,
InterpretCompilerDirectives
(
self
,
self
.
pragma_overrid
es
),
InterpretCompilerDirectives
(
self
,
self
.
compiler_directiv
es
),
_align_function_definitions
,
_align_function_definitions
,
ConstantFolding
(),
ConstantFolding
(),
FlattenInListTransform
(),
FlattenInListTransform
(),
...
@@ -526,7 +526,7 @@ def create_default_resultobj(compilation_source, options):
...
@@ -526,7 +526,7 @@ def create_default_resultobj(compilation_source, options):
def
run_pipeline
(
source
,
options
,
full_module_name
=
None
):
def
run_pipeline
(
source
,
options
,
full_module_name
=
None
):
# Set up context
# Set up context
context
=
Context
(
options
.
include_path
,
options
.
pragma_overrid
es
)
context
=
Context
(
options
.
include_path
,
options
.
compiler_directiv
es
)
# Set up source object
# Set up source object
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
...
@@ -579,7 +579,7 @@ class CompilationOptions(object):
...
@@ -579,7 +579,7 @@ class CompilationOptions(object):
defaults to true when recursive is true.
defaults to true when recursive is true.
verbose boolean Always print source names being compiled
verbose boolean Always print source names being compiled
quiet boolean Don't print source names in recursive mode
quiet boolean Don't print source names in recursive mode
pragma_overrid
es dict Overrides for pragma options (see Options.py)
compiler_directiv
es dict Overrides for pragma options (see Options.py)
Following options are experimental and only used on MacOSX:
Following options are experimental and only used on MacOSX:
...
@@ -767,7 +767,7 @@ default_options = dict(
...
@@ -767,7 +767,7 @@ default_options = dict(
timestamps
=
None
,
timestamps
=
None
,
verbose
=
0
,
verbose
=
0
,
quiet
=
0
,
quiet
=
0
,
pragma_overrid
es
=
{},
compiler_directiv
es
=
{},
emit_linenums
=
False
,
emit_linenums
=
False
,
)
)
if
sys
.
platform
==
"mac"
:
if
sys
.
platform
==
"mac"
:
...
...
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