summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2022-04-14 05:57:25 (GMT)
committerGitHub <noreply@github.com>2022-04-14 05:57:25 (GMT)
commit7b87e8af0cb8df0d76e8ab18a9b12affb4526103 (patch)
tree0c708a2da204c14b8deaace21b549aadf3df4d2f /Modules
parent45e8c9d43ff4f53c6b6f9f00d94d02ee36299b36 (diff)
downloadcpython-7b87e8af0cb8df0d76e8ab18a9b12affb4526103.zip
cpython-7b87e8af0cb8df0d76e8ab18a9b12affb4526103.tar.gz
cpython-7b87e8af0cb8df0d76e8ab18a9b12affb4526103.tar.bz2
gh-90699: Remove usage of _Py_IDENTIFIER from bisect module. (GH-91522)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_bisectmodule.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c
index f884d94..c54dc49 100644
--- a/Modules/_bisectmodule.c
+++ b/Modules/_bisectmodule.c
@@ -4,7 +4,6 @@ Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru).
*/
#define PY_SSIZE_T_CLEAN
-#define NEEDS_PY_IDENTIFIER
#include "Python.h"
/*[clinic input]
@@ -14,8 +13,6 @@ module _bisect
#include "clinic/_bisectmodule.c.h"
-_Py_IDENTIFIER(insert);
-
static inline Py_ssize_t
internal_bisect_right(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi,
PyObject* key)
@@ -132,7 +129,7 @@ _bisect_insort_right_impl(PyObject *module, PyObject *a, PyObject *x,
return NULL;
}
else {
- result = _PyObject_CallMethodId(a, &PyId_insert, "nO", index, x);
+ result = PyObject_CallMethod(a, "insert", "nO", index, x);
if (result == NULL)
return NULL;
Py_DECREF(result);
@@ -258,7 +255,7 @@ _bisect_insort_left_impl(PyObject *module, PyObject *a, PyObject *x,
if (PyList_Insert(a, index, x) < 0)
return NULL;
} else {
- result = _PyObject_CallMethodId(a, &PyId_insert, "nO", index, x);
+ result = PyObject_CallMethod(a, "insert", "nO", index, x);
if (result == NULL)
return NULL;
Py_DECREF(result);