summaryrefslogtreecommitdiffstats
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-15 17:27:45 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-02-15 17:27:45 (GMT)
commit18e165558b24d29e7e0ca501842b9236589b012a (patch)
tree841678b5dc1aff3aa48701fee33a6ba7be00a72b /Objects/sliceobject.c
parent44829297348d9121a03fc7df2fac557b583cc7fa (diff)
downloadcpython-18e165558b24d29e7e0ca501842b9236589b012a.zip
cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.gz
cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.bz2
Merge ssize_t branch.
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index f5ed898..3b37dbb 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -80,9 +80,10 @@ PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
}
int
-PySlice_GetIndices(PySliceObject *r, int length,
- int *start, int *stop, int *step)
+PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step)
{
+ /* XXX support long ints */
if (r->step == Py_None) {
*step = 1;
} else {
@@ -110,12 +111,12 @@ PySlice_GetIndices(PySliceObject *r, int length,
}
int
-PySlice_GetIndicesEx(PySliceObject *r, int length,
- int *start, int *stop, int *step, int *slicelength)
+PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length,
+ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
{
/* this is harder to get right than you might think */
- int defstart, defstop;
+ Py_ssize_t defstart, defstop;
if (r->step == Py_None) {
*step = 1;
@@ -230,7 +231,7 @@ static PyMemberDef slice_members[] = {
static PyObject*
slice_indices(PySliceObject* self, PyObject* len)
{
- int ilen, start, stop, step, slicelength;
+ Py_ssize_t ilen, start, stop, step, slicelength;
ilen = PyInt_AsLong(len);