From e75fc148136bbef192c5572c14f3abf1f67abc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 7 Nov 2013 18:46:53 +0100 Subject: Issue #19514: Deduplicate some _Py_IDENTIFIER declarations. Patch by Andrei Dorian Duma. --- Modules/_bisectmodule.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Modules/_bisectmodule.c') diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index faca8cfbca..02b55d1b41 100644 --- a/Modules/_bisectmodule.c +++ b/Modules/_bisectmodule.c @@ -6,6 +6,8 @@ Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru). #define PY_SSIZE_T_CLEAN #include "Python.h" +_Py_IDENTIFIER(insert); + static Py_ssize_t internal_bisect_right(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi) { @@ -90,8 +92,6 @@ insort_right(PyObject *self, PyObject *args, PyObject *kw) if (PyList_Insert(list, index, item) < 0) return NULL; } else { - _Py_IDENTIFIER(insert); - result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item); if (result == NULL) return NULL; @@ -195,7 +195,6 @@ insort_left(PyObject *self, PyObject *args, PyObject *kw) if (PyList_Insert(list, index, item) < 0) return NULL; } else { - _Py_IDENTIFIER(insert); result = _PyObject_CallMethodId(list, &PyId_insert, "nO", index, item); if (result == NULL) return NULL; -- cgit v1.2.1