diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-05-16 12:39:36 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-05-16 12:39:36 (GMT) |
commit | b7d033db783b8ca2e4dfe23e348129ed666b6e2b (patch) | |
tree | 4c504d15647a3997d62e8e2da43dc16d5a2791da /Modules/_bisectmodule.c | |
parent | b84bc7a7ce6649f786b5b3f80e944cb51b332faf (diff) | |
parent | a103b96a80f049f68ccf2dd3d5d7858b26a27e94 (diff) | |
download | cpython-b7d033db783b8ca2e4dfe23e348129ed666b6e2b.zip cpython-b7d033db783b8ca2e4dfe23e348129ed666b6e2b.tar.gz cpython-b7d033db783b8ca2e4dfe23e348129ed666b6e2b.tar.bz2 |
Issue #14829: Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
(untested, because of Windows build issues under 3.x)
Diffstat (limited to 'Modules/_bisectmodule.c')
-rw-r--r-- | Modules/_bisectmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index 4d0a2e4..faca8cf 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 @@ -195,8 +196,7 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw) return NULL; } else { _Py_IDENTIFIER(insert); - - result = _PyObject_CallMethodId(list, &PyId_insert, "iO", index, item); + result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item); if (result == NULL) return NULL; Py_DECREF(result); |