summaryrefslogtreecommitdiffstats
path: root/Modules/_bisectmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_bisectmodule.c')
-rw-r--r--Modules/_bisectmodule.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c
index eae2978..faca8cf 100644
--- a/Modules/_bisectmodule.c
+++ b/Modules/_bisectmodule.c
@@ -90,7 +90,9 @@ insort_right(PyObject *self, PyObject *args, PyObject *kw)
if (PyList_Insert(list, index, item) < 0)
return NULL;
} else {
- result = PyObject_CallMethod(list, "insert", "nO", index, item);
+ _Py_IDENTIFIER(insert);
+
+ result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item);
if (result == NULL)
return NULL;
Py_DECREF(result);
@@ -193,7 +195,8 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw)
if (PyList_Insert(list, index, item) < 0)
return NULL;
} else {
- result = PyObject_CallMethod(list, "insert", "nO", index, item);
+ _Py_IDENTIFIER(insert);
+ result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item);
if (result == NULL)
return NULL;
Py_DECREF(result);