summaryrefslogtreecommitdiffstats
path: root/Modules
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 /Modules
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 'Modules')
-rw-r--r--Modules/_bisectmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c
index 93d0eed..eae2978 100644
--- a/Modules/_bisectmodule.c
+++ b/Modules/_bisectmodule.c
@@ -3,6 +3,7 @@
Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru).
*/
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
static Py_ssize_t
@@ -192,7 +193,7 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw)
if (PyList_Insert(list, index, item) < 0)
return NULL;
} else {
- result = PyObject_CallMethod(list, "insert", "iO", index, item);
+ result = PyObject_CallMethod(list, "insert", "nO", index, item);
if (result == NULL)
return NULL;
Py_DECREF(result);