Commit 0a26af45 authored by Stefan Behnel's avatar Stefan Behnel

fix passing explicit None slice indices into the getslice code, enable test case for ticket 636

--HG--
rename : tests/run/slice2_T636.pyx => tests/run/slice2_T636.py
parent 3a826ea9
......@@ -463,14 +463,14 @@ static CYTHON_INLINE PyObject* __Pyx_PySequence_GetObjectSlice(
PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
if (likely(ms && ms->sq_slice)) {
if (!has_cstart) {
if (_py_start) {
if (_py_start && (*_py_start != Py_None)) {
cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) return NULL;
} else
cstart = 0;
}
if (!has_cstop) {
if (_py_stop) {
if (_py_stop && (*_py_stop != Py_None)) {
cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) return NULL;
} else
......@@ -565,14 +565,14 @@ static CYTHON_INLINE int __Pyx_PySequence_SetObjectSlice(
PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
if (likely(ms && ms->sq_ass_slice)) {
if (!has_cstart) {
if (_py_start) {
if (_py_start && (*_py_start != Py_None)) {
cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
} else
cstart = 0;
}
if (!has_cstop) {
if (_py_stop) {
if (_py_stop && (*_py_stop != Py_None)) {
cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
} else
......
......@@ -11,7 +11,6 @@ genexpr_iterable_lookup_T600
generator_expressions_in_class
for_from_pyvar_loop_T601
temp_sideeffects_T654 # not really a bug, Cython warns about it
slice2_T636
inherited_final_method
tryfinallychaining # also see FIXME in "yield_from_pep380" test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment