From b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 8 Apr 2017 09:53:51 +0300 Subject: Expand the PySlice_GetIndicesEx macro. (#1023) --- Objects/tupleobject.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Objects/tupleobject.c') diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 55da0e3a2b..2a90490499 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -758,11 +758,11 @@ tuplesubscript(PyTupleObject* self, PyObject* item) PyObject* it; PyObject **src, **dest; - if (PySlice_GetIndicesEx(item, - PyTuple_GET_SIZE(self), - &start, &stop, &step, &slicelength) < 0) { + if (PySlice_Unpack(item, &start, &stop, &step) < 0) { return NULL; } + slicelength = PySlice_AdjustIndices(PyTuple_GET_SIZE(self), &start, + &stop, step); if (slicelength <= 0) { return PyTuple_New(0); -- cgit v1.2.1