Library
-------
+- Issue #14829: Fix bisect and range() indexing with large indices
+ (>= 2 ** 32) under 64-bit Windows.
+
- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when
accessing the Tk clipboard. Modify clipboad_get() to first request type
UTF8_STRING when no specific type is requested in an X11 windowing
Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru).
*/
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
static Py_ssize_t
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);
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;
}