mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Issue #14829: Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
This commit is contained in:
parent
5cdc6308b6
commit
a103b96a80
3 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue