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
9baaa6bf
Commit
9baaa6bf
authored
Feb 09, 2010
by
Craig Citro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #505 mistakenly treated things like "cimport cythontools" as a cython import.
parent
1565d164
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+4
-2
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
9baaa6bf
...
@@ -395,7 +395,8 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
...
@@ -395,7 +395,8 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
return
node
return
node
def
visit_FromCImportStatNode
(
self
,
node
):
def
visit_FromCImportStatNode
(
self
,
node
):
if
node
.
module_name
.
startswith
(
u"cython"
):
if
(
node
.
module_name
==
u"cython"
)
or
\
node
.
module_name
.
startswith
(
u"cython."
):
submodule
=
(
node
.
module_name
+
u"."
)[
7
:]
submodule
=
(
node
.
module_name
+
u"."
)[
7
:]
newimp
=
[]
newimp
=
[]
for
pos
,
name
,
as_name
,
kind
in
node
.
imported_names
:
for
pos
,
name
,
as_name
,
kind
in
node
.
imported_names
:
...
@@ -415,7 +416,8 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
...
@@ -415,7 +416,8 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
return
node
return
node
def
visit_FromImportStatNode
(
self
,
node
):
def
visit_FromImportStatNode
(
self
,
node
):
if
node
.
module
.
module_name
.
value
.
startswith
(
u"cython"
):
if
(
node
.
module
.
module_name
.
value
==
u"cython"
)
or
\
node
.
module
.
module_name
.
value
.
startswith
(
u"cython."
):
submodule
=
(
node
.
module
.
module_name
.
value
+
u"."
)[
7
:]
submodule
=
(
node
.
module
.
module_name
.
value
+
u"."
)[
7
:]
newimp
=
[]
newimp
=
[]
for
name
,
name_node
in
node
.
items
:
for
name
,
name_node
in
node
.
items
:
...
...
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