Skip to content

Commit dddec81

Browse files
Issue #21449: Removed private function _PyUnicode_CompareWithId.
1 parent fab6acd commit dddec81

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
@@ -11011,15 +11011,6 @@ PyUnicode_Compare(PyObject *left, PyObject *right)
1101111011
return -1;
1101211012
}
1101311013

11014-
int
11015-
_PyUnicode_CompareWithId(PyObject *left, _Py_Identifier *right)
11016-
{
11017-
PyObject *right_str = _PyUnicode_FromId(right); /* borrowed */
11018-
if (right_str == NULL)
11019-
return -1;
11020-
return PyUnicode_Compare(left, right_str);
11021-
}
11022-
1102311014
int
1102411015
PyUnicode_CompareWithASCIIString(PyObject* uni, const char* str)
1102511016
{

0 commit comments

Comments
 (0)