summaryrefslogtreecommitdiff
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 +0000
committerChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 +0000
commit217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch)
tree4737b4a91359c94953623ab9ee297e9a90f319e4 /Objects/sliceobject.c
parent1a3284ed69d545e4ef59869998cb8c29233a45fa (diff)
downloadcpython-git-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 28b92d05f8..dec4d4541f 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -83,10 +83,10 @@ PyObject *
_PySlice_FromIndices(Py_ssize_t istart, Py_ssize_t istop)
{
PyObject *start, *end, *slice;
- start = PyInt_FromSsize_t(istart);
+ start = PyLong_FromSsize_t(istart);
if (!start)
return NULL;
- end = PyInt_FromSsize_t(istop);
+ end = PyLong_FromSsize_t(istop);
if (!end) {
Py_DECREF(start);
return NULL;
@@ -107,20 +107,20 @@ PySlice_GetIndices(PySliceObject *r, Py_ssize_t length,
*step = 1;
} else {
if (!PyLong_Check(r->step)) return -1;
- *step = PyInt_AsSsize_t(r->step);
+ *step = PyLong_AsSsize_t(r->step);
}
if (r->start == Py_None) {
*start = *step < 0 ? length-1 : 0;
} else {
- if (!PyInt_Check(r->start)) return -1;
- *start = PyInt_AsSsize_t(r->start);
+ if (!PyLong_Check(r->start)) return -1;
+ *start = PyLong_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)) return -1;
- *stop = PyInt_AsSsize_t(r->stop);
+ if (!PyLong_Check(r->stop)) return -1;
+ *stop = PyLong_AsSsize_t(r->stop);
if (*stop < 0) *stop += length;
}
if (*stop > length) return -1;