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
a729ca91
Commit
a729ca91
authored
Jul 22, 2018
by
cjgibson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initial notes from initial debugging.
parent
225da25f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+12
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
a729ca91
...
...
@@ -4794,6 +4794,18 @@ class SliceIndexNode(ExprNode):
step
=
none_node
).
analyse_types
(
env
)
else
:
# @TODO: Issue-2508
# NameNode.coerce_to below returns an instance
# of CoerceFromPyTypeNode, which is attempting a hard coercion to
# PyrexTypes.c_py_ssize_t_type via __Pyx_PyIndex_AsSsize_t, which
# internally relies on the CPython builtin PyNumber_Index, which
# fails outright provided with non-integer input.
# As a result, the following code is generated:
# __pyx_t_TMPIDX = __Pyx_PyIndex_AsSsize_t(__pyx_v_VARNAME);
# Which, in the case of self.start, needs to become:
# if (__pyx_v_VARNAME == Py_None) { __pyx_t_TMPIDX = 0; } else { __pyx_t_TMPIDX = __Pyx_PyIndex_AsSsize_t(__pyx_v_VARNAME); }
# And, in the case of self.stop, needs to become:
# if (__pyx_v_VARNAME == Py_None) { __pyx_t_TMPIDX = PY_SSIZE_T_MAX; } else { __pyx_t_TMPIDX = __Pyx_PyIndex_AsSsize_t(__pyx_v_VARNAME); }
c_int
=
PyrexTypes
.
c_py_ssize_t_type
if
self
.
start
:
self
.
start
=
self
.
start
.
coerce_to
(
c_int
,
env
)
...
...
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