summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-05-16 12:37:54 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-05-16 12:37:54 (GMT)
commita103b96a80f049f68ccf2dd3d5d7858b26a27e94 (patch)
tree273d34aaef693b979534b1bfc126ec4560b27a3b /Objects
parent5cdc6308b6ac134ab65f2001e37b0c067dadef7d (diff)
downloadcpython-a103b96a80f049f68ccf2dd3d5d7858b26a27e94.zip
cpython-a103b96a80f049f68ccf2dd3d5d7858b26a27e94.tar.gz
cpython-a103b96a80f049f68ccf2dd3d5d7858b26a27e94.tar.bz2
Issue #14829: Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/rangeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 58d373c..935b205 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -307,7 +307,7 @@ compute_range_item(rangeobject *r, PyObject *arg)
static PyObject *
range_item(rangeobject *r, Py_ssize_t i)
{
- PyObject *res, *arg = PyLong_FromLong(i);
+ PyObject *res, *arg = PyLong_FromSsize_t(i);
if (!arg) {
return NULL;
}