diff options
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 9b93898..ef4f8c1 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1310,11 +1310,11 @@ string_subscript(PyStringObject* self, PyObject* item) char* result_buf; PyObject* result; - if (PySlice_GetIndicesEx((PySliceObject*)item, - PyString_GET_SIZE(self), - &start, &stop, &step, &slicelength) < 0) { + if (_PySlice_Unpack((PySliceObject *)item, &start, &stop, &step) < 0) { return NULL; } + slicelength = _PySlice_AdjustIndices(PyString_GET_SIZE(self), &start, + &stop, step); if (slicelength <= 0) { return PyString_FromStringAndSize("", 0); |