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
151c05d1
Commit
151c05d1
authored
Feb 14, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not try to automatically infer ctuple types if one of the items is a memoryview.
parent
9f3f99fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+5
-4
No files found.
Cython/Compiler/ExprNodes.py
View file @
151c05d1
...
...
@@ -7757,10 +7757,10 @@ class TupleNode(SequenceNode):
if
self
.
mult_factor
or
not
self
.
args
:
return
tuple_type
arg_types
=
[
arg
.
infer_type
(
env
)
for
arg
in
self
.
args
]
if
any
(
type
.
is_pyobject
or
type
.
is_unspecified
or
type
.
is_fused
for
type
in
arg_types
):
if
any
(
type
.
is_pyobject
or
type
.
is_memoryviewslice
or
type
.
is_unspecified
or
type
.
is_fused
for
type
in
arg_types
):
return
tuple_type
else
:
return
env
.
declare_tuple_type
(
self
.
pos
,
arg_types
).
type
return
env
.
declare_tuple_type
(
self
.
pos
,
arg_types
).
type
def
analyse_types
(
self
,
env
,
skip_children
=
False
):
if
len
(
self
.
args
)
==
0
:
...
...
@@ -7774,7 +7774,8 @@ class TupleNode(SequenceNode):
arg
.
starred_expr_allowed_here
=
True
self
.
args
[
i
]
=
arg
.
analyse_types
(
env
)
if
(
not
self
.
mult_factor
and
not
any
((
arg
.
is_starred
or
arg
.
type
.
is_pyobject
or
arg
.
type
.
is_fused
)
for
arg
in
self
.
args
)):
not
any
((
arg
.
is_starred
or
arg
.
type
.
is_pyobject
or
arg
.
type
.
is_memoryviewslice
or
arg
.
type
.
is_fused
)
for
arg
in
self
.
args
)):
self
.
type
=
env
.
declare_tuple_type
(
self
.
pos
,
(
arg
.
type
for
arg
in
self
.
args
)).
type
self
.
is_temp
=
1
return
self
...
...
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