summaryrefslogtreecommitdiffstats
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-10-23 19:24:22 (GMT)
committerGeorg Brandl <georg@python.org>2007-10-23 19:24:22 (GMT)
commite1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f (patch)
treeb189190df6a08b5249bef4e33385049f4ccf3d04 /Objects/sliceobject.c
parent083bea49a8b74a5f758c6641c299f0cc8c114616 (diff)
downloadcpython-e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f.zip
cpython-e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f.tar.gz
cpython-e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f.tar.bz2
#1316: remove redundant PyLong_Check calls when PyInt_Check was already called.
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index d160b07..28b92d0 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -112,14 +112,14 @@ PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,
if (r->start == Py_None) {
*start = *step < 0 ? length-1 : 0;
} else {
- if (!PyInt_Check(r->start) && !PyLong_Check(r->step)) return -1;
+ if (!PyInt_Check(r->start)) return -1;
*start = PyInt_AsSsize_t(r->start);
if (*start < 0) *start += length;
}
if (r->stop == Py_None) {
*stop = *step < 0 ? -1 : length;
} else {
- if (!PyInt_Check(r->stop) && !PyLong_Check(r->step)) return -1;
+ if (!PyInt_Check(r->stop)) return -1;
*stop = PyInt_AsSsize_t(r->stop);
if (*stop < 0) *stop += length;
}