diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-20 01:55:26 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-20 01:55:26 (GMT) |
commit | 29892cc3862cfa5f343dbacb410edadf02fcce9d (patch) | |
tree | 0119be0d3f933a8afbadcc6db6300a8bbe34f6f8 /Objects | |
parent | 2aa9a5dfdd2966c57036dc836ba8e91ad47ecf14 (diff) | |
download | cpython-29892cc3862cfa5f343dbacb410edadf02fcce9d.zip cpython-29892cc3862cfa5f343dbacb410edadf02fcce9d.tar.gz cpython-29892cc3862cfa5f343dbacb410edadf02fcce9d.tar.bz2 |
Update function name to reflect params and stop casting to long to avoid losing data
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 399656f..9d1aaf0 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1248,13 +1248,13 @@ PySequence_GetItem(PyObject *s, Py_ssize_t i) } static PyObject * -sliceobj_from_intint(Py_ssize_t i, Py_ssize_t j) +sliceobj_from_ssizet_ssizet(Py_ssize_t i, Py_ssize_t j) { PyObject *start, *end, *slice; - start = PyInt_FromLong((long)i); + start = PyInt_FromSsize_t(i); if (!start) return NULL; - end = PyInt_FromLong((long)j); + end = PyInt_FromSsize_t(j); if (!end) { Py_DECREF(start); return NULL; @@ -1289,7 +1289,7 @@ PySequence_GetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2) return m->sq_slice(s, i1, i2); } else if ((mp = s->ob_type->tp_as_mapping) && mp->mp_subscript) { PyObject *res; - PyObject *slice = sliceobj_from_intint(i1, i2); + PyObject *slice = sliceobj_from_ssizet_ssizet(i1, i2); if (!slice) return NULL; res = mp->mp_subscript(s, slice); @@ -1381,7 +1381,7 @@ PySequence_SetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2, PyObject *o) return m->sq_ass_slice(s, i1, i2, o); } else if ((mp = s->ob_type->tp_as_mapping) && mp->mp_ass_subscript) { int res; - PyObject *slice = sliceobj_from_intint(i1, i2); + PyObject *slice = sliceobj_from_ssizet_ssizet(i1, i2); if (!slice) return -1; res = mp->mp_ass_subscript(s, slice, o); |