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
c90c2e0e
Commit
c90c2e0e
authored
May 04, 2011
by
Mark Florisson
Committed by
Vitja Makarov
May 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py23 compat
parent
2d2cc261
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+9
-5
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
c90c2e0e
...
@@ -665,16 +665,20 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
...
@@ -665,16 +665,20 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
PyrexTypes
.
parse_basic_type
(
name
))
PyrexTypes
.
parse_basic_type
(
name
))
def
is_parallel_directive
(
self
,
full_name
,
pos
):
def
is_parallel_directive
(
self
,
full_name
,
pos
):
"""
Checks to see if fullname (e.g. cython.parallel.prange) is a valid
parallel directive. If it is a star import it also updates the
parallel_directives.
"""
result
=
(
full_name
+
"."
).
startswith
(
"cython.parallel."
)
result
=
(
full_name
+
"."
).
startswith
(
"cython.parallel."
)
if
result
:
if
result
:
directive
=
full_name
.
rsplit
(
'.'
,
1
)
directive
=
full_name
.
split
(
'.'
)
if
len
(
directive
)
==
2
and
directive
[
1
]
==
'*'
:
if
full_name
==
u"cython.parallel.*"
:
# star import
for
name
in
self
.
valid_parallel_directives
:
for
name
in
self
.
valid_parallel_directives
:
self
.
parallel_directives
[
name
]
=
u"cython.parallel.%s"
%
name
self
.
parallel_directives
[
name
]
=
u"cython.parallel.%s"
%
name
elif
(
len
(
directive
)
!=
2
or
elif
(
len
(
directive
)
!=
3
or
directive
[
1
]
not
in
self
.
valid_parallel_directives
):
directive
[
-
1
]
not
in
self
.
valid_parallel_directives
):
error
(
pos
,
"No such directive: %s"
%
full_name
)
error
(
pos
,
"No such directive: %s"
%
full_name
)
return
result
return
result
...
...
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