Mailing List Archive

python/dist/src/Objects sliceobject.c,2.19,2.20
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv11986/Objects

Modified Files:
sliceobject.c
Log Message:
Handle really big steps in extended slices.

Fixes a test failure on 64 bit platforms (I hope).



Index: sliceobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -d -r2.19 -r2.20
*** sliceobject.c 5 Nov 2002 15:28:51 -0000 2.19
--- sliceobject.c 6 Nov 2002 15:17:31 -0000 2.20
***************
*** 122,130 ****
}
else {
! *step = PyInt_AsLong(r->step);
! if (*step == -1 && PyErr_Occurred()) {
! return -1;
! }
! else if (*step == 0) {
PyErr_SetString(PyExc_ValueError,
"slice step cannot be zero");
--- 122,127 ----
}
else {
! if (!_PyEval_SliceIndex(r->step, step)) return -1;
! if (*step == 0) {
PyErr_SetString(PyExc_ValueError,
"slice step cannot be zero");