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
12a9f342
Commit
12a9f342
authored
Jul 29, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let ctuples not automatically infer to PyObject
parent
5d496c99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Cython/Compiler/TypeInference.py
Cython/Compiler/TypeInference.py
+4
-0
No files found.
Cython/Compiler/TypeInference.py
View file @
12a9f342
...
@@ -587,6 +587,10 @@ def safe_spanning_type(types, might_overflow, pos, scope):
...
@@ -587,6 +587,10 @@ def safe_spanning_type(types, might_overflow, pos, scope):
return
result_type
return
result_type
elif
result_type
.
is_memoryviewslice
:
elif
result_type
.
is_memoryviewslice
:
return
result_type
return
result_type
elif
resolved_result_type
.
is_ctuple
:
# Since structs are considered safe, and ctuples are essentially structs
# with tuple-like syntax, they should be safe for the same reasons.
return
result_type
# TODO: double complex should be OK as well, but we need
# TODO: double complex should be OK as well, but we need
# to make sure everything is supported.
# to make sure everything is supported.
elif
(
resolved_result_type
.
is_int
or
resolved_result_type
.
is_enum
)
and
not
might_overflow
:
elif
(
resolved_result_type
.
is_int
or
resolved_result_type
.
is_enum
)
and
not
might_overflow
:
...
...
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