gh-124502: Remove _PyUnicode_EQ() function (#125114)

* Replace unicode_compare_eq() with unicode_eq().
* Use unicode_eq() in setobject.c.
* Replace _PyUnicode_EQ() with _PyUnicode_Equal().
* Remove unicode_compare_eq() and _PyUnicode_EQ().
This commit is contained in:
Victor Stinner 2024-10-09 10:15:17 +02:00 committed by GitHub
parent 7f93dbf6fe
commit e0c87c64b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 39 deletions

View file

@ -2064,7 +2064,7 @@ find_keyword(PyObject *kwnames, PyObject *const *kwstack, PyObject *key)
for (i = 0; i < nkwargs; i++) {
PyObject *kwname = PyTuple_GET_ITEM(kwnames, i);
assert(PyUnicode_Check(kwname));
if (_PyUnicode_EQ(kwname, key)) {
if (_PyUnicode_Equal(kwname, key)) {
return Py_NewRef(kwstack[i]);
}
}