summaryrefslogtreecommitdiff
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-08-12 17:03:09 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-08-12 17:03:09 +0000
commit2592e579304b75f2474a2758bd299cfdcb038b42 (patch)
tree26c872d0a54c82e4112bb393cf3612205ee5d76b /Objects/sliceobject.c
parent103ef578717f79e07845c3961c33271370ef9611 (diff)
downloadcpython-2592e579304b75f2474a2758bd299cfdcb038b42.tar.gz
Patch #1538606, Patch to fix __index__() clipping.
I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 271a9ad62d..d8a24653a7 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -252,7 +252,7 @@ slice_indices(PySliceObject* self, PyObject* len)
{
Py_ssize_t ilen, start, stop, step, slicelength;
- ilen = PyInt_AsSsize_t(len);
+ ilen = PyNumber_AsSsize_t(len, PyExc_OverflowError);
if (ilen == -1 && PyErr_Occurred()) {
return NULL;