diff -r 222b9392a83b Include/sliceobject.h --- a/Include/sliceobject.h Sat Feb 04 08:05:07 2017 +0200 +++ b/Include/sliceobject.h Sat Feb 04 08:27:32 2017 +0200 @@ -46,8 +46,9 @@ PyAPI_FUNC(int) PySlice_GetIndicesEx(PyO #if !defined(Py_LIMITED_API) || (Py_LIMITED_API+0 >= 0x03050400 && Py_LIMITED_API+0 < 0x03060000) || Py_LIMITED_API+0 >= 0x03060100 #define PySlice_GetIndicesEx(slice, length, start, stop, step, slicelen) ( \ - PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? -1 : \ - ((*slicelen = PySlice_AdjustIndices((length), (start), (stop), *(step))), \ + PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? \ + ((*(slicelen) = 0), -1) : \ + ((*(slicelen) = PySlice_AdjustIndices((length), (start), (stop), *(step))), \ 0)) PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);