Skip to content

Commit ee1e01c

Browse files
Issue #21449: Removed private function _PyUnicode_CompareWithId.
2 parents f6396f0 + ab40208 commit ee1e01c

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

Include/unicodeobject.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,15 +2037,6 @@ PyAPI_FUNC(int) PyUnicode_Compare(
20372037
);
20382038

20392039
#ifndef Py_LIMITED_API
2040-
/* Compare a string with an identifier and return -1, 0, 1 for less than,
2041-
equal, and greater than, respectively.
2042-
Raise an exception and return -1 on error. */
2043-
2044-
PyAPI_FUNC(int) _PyUnicode_CompareWithId(
2045-
PyObject *left, /* Left string */
2046-
_Py_Identifier *right /* Right identifier */
2047-
);
2048-
20492040
/* Test whether a unicode is equal to ASCII identifier. Return 1 if true,
20502041
0 otherwise. Return 0 if any argument contains non-ASCII characters.
20512042
Any error occurs inside will be cleared before return. */

Objects/unicodeobject.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10992,15 +10992,6 @@ PyUnicode_Compare(PyObject *left, PyObject *right)
1099210992
return -1;
1099310993
}
1099410994

10995-
int
10996-
_PyUnicode_CompareWithId(PyObject *left, _Py_Identifier *right)
10997-
{
10998-
PyObject *right_str = _PyUnicode_FromId(right); /* borrowed */
10999-
if (right_str == NULL)
11000-
return -1;
11001-
return PyUnicode_Compare(left, right_str);
11002-
}
11003-
1100410995
int
1100510996
PyUnicode_CompareWithASCIIString(PyObject* uni, const char* str)
1100610997
{

0 commit comments

Comments
 (0)