|
|
@ -3,6 +3,7 @@ |
|
|
Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru). |
|
|
Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru). |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
#define PY_SSIZE_T_CLEAN |
|
|
#include "Python.h" |
|
|
#include "Python.h" |
|
|
|
|
|
|
|
|
static Py_ssize_t |
|
|
static Py_ssize_t |
|
|
@ -195,8 +196,7 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw) |
|
|
return NULL; |
|
|
return NULL; |
|
|
} else { |
|
|
} else { |
|
|
_Py_IDENTIFIER(insert); |
|
|
_Py_IDENTIFIER(insert); |
|
|
|
|
|
|
|
|
result = _PyObject_CallMethodId(list, &PyId_insert, "iO", index, item); |
|
|
|
|
|
|
|
|
result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item); |
|
|
if (result == NULL) |
|
|
if (result == NULL) |
|
|
return NULL; |
|
|
return NULL; |
|
|
Py_DECREF(result); |
|
|
Py_DECREF(result); |
|
|
|