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
9ec9a66f
Commit
9ec9a66f
authored
May 01, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass some more tests
parent
a17fac09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
Cython/Compiler/CythonScope.py
Cython/Compiler/CythonScope.py
+2
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+11
-10
Cython/Compiler/TypeInference.py
Cython/Compiler/TypeInference.py
+1
-1
No files found.
Cython/Compiler/CythonScope.py
View file @
9ec9a66f
...
...
@@ -22,6 +22,8 @@ class CythonScope(ModuleScope):
if
type
:
return
type
return
super
(
CythonScope
,
self
).
lookup_type
(
name
)
def
create_cython_scope
(
context
):
create_utility_scope
(
context
)
return
CythonScope
(
context
)
...
...
Cython/Compiler/Nodes.py
View file @
9ec9a66f
...
...
@@ -3823,16 +3823,17 @@ class SingleAssignmentNode(AssignmentNode):
# See if we're dealing with this:
# dtype = cython.typedef(cython.fused_type(...))
nested_func_name
=
args
[
0
].
function
.
as_cython_attribute
()
if
nested_func_name
==
u'fused_type'
:
nested_args
,
nested_kwds
=
args
[
0
].
explicit_args_kwds
()
if
nested_kwds
is
not
None
:
error
(
self
.
rhs
.
pos
,
"fused_type does not take keyword arguments"
)
args
[
0
]
=
FusedTypeNode
(
self
.
rhs
.
pos
,
types
=
nested_args
)
args
[
0
].
name
=
self
.
lhs
.
name
if
isinstance
(
args
[
0
],
ExprNodes
.
SimpleCallNode
):
nested_func_name
=
args
[
0
].
function
.
as_cython_attribute
()
if
nested_func_name
==
u'fused_type'
:
nested_args
,
nested_kwds
=
args
[
0
].
explicit_args_kwds
()
if
nested_kwds
is
not
None
:
error
(
self
.
rhs
.
pos
,
"fused_type does not take keyword arguments"
)
args
[
0
]
=
FusedTypeNode
(
self
.
rhs
.
pos
,
types
=
nested_args
)
args
[
0
].
name
=
self
.
lhs
.
name
type
=
args
[
0
].
analyse_as_type
(
env
)
if
type
is
None
:
...
...
Cython/Compiler/TypeInference.py
View file @
9ec9a66f
...
...
@@ -270,7 +270,7 @@ class SimpleAssignmentTypeInferer(object):
while
ready_to_infer
:
entry
=
ready_to_infer
.
pop
()
types
=
[
expr
.
infer_type
(
scope
)
for
expr
in
entry
.
assignments
]
if
Utils
.
all
(
types
):
if
types
and
Utils
.
all
(
types
):
entry
.
type
=
spanning_type
(
types
,
entry
.
might_overflow
)
else
:
# FIXME: raise a warning?
...
...
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