summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 4871945..19a6fed 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -713,11 +713,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);