diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 13:56:50 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 13:56:50 (GMT) |
commit | 503db266a5fa4043b57f558645f4bfe18ffec5b6 (patch) | |
tree | 2241d3dcacfc28883acd9649444f585e7efee872 | |
parent | 29a54473600bc69975fd84b67570f5b04c447d84 (diff) | |
parent | dddec81b2d0f0df7e91f2cafc3c2e4121cb6c1d6 (diff) | |
download | cpython-503db266a5fa4043b57f558645f4bfe18ffec5b6.zip cpython-503db266a5fa4043b57f558645f4bfe18ffec5b6.tar.gz cpython-503db266a5fa4043b57f558645f4bfe18ffec5b6.tar.bz2 |
Issue #21449: Removed private function _PyUnicode_CompareWithId.
-rw-r--r-- | Include/unicodeobject.h | 9 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 9 |
2 files changed, 0 insertions, 18 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index f8f98bd..67c4422 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -2037,15 +2037,6 @@ PyAPI_FUNC(int) PyUnicode_Compare( ); #ifndef Py_LIMITED_API -/* Compare a string with an identifier and return -1, 0, 1 for less than, - equal, and greater than, respectively. - Raise an exception and return -1 on error. */ - -PyAPI_FUNC(int) _PyUnicode_CompareWithId( - PyObject *left, /* Left string */ - _Py_Identifier *right /* Right identifier */ - ); - /* Test whether a unicode is equal to ASCII identifier. Return 1 if true, 0 otherwise. Return 0 if any argument contains non-ASCII characters. Any error occurs inside will be cleared before return. */ diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2c1f5c3..4b28ce4 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -10993,15 +10993,6 @@ PyUnicode_Compare(PyObject *left, PyObject *right) } int -_PyUnicode_CompareWithId(PyObject *left, _Py_Identifier *right) -{ - PyObject *right_str = _PyUnicode_FromId(right); /* borrowed */ - if (right_str == NULL) - return -1; - return PyUnicode_Compare(left, right_str); -} - -int PyUnicode_CompareWithASCIIString(PyObject* uni, const char* str) { Py_ssize_t i; |