[Python-checkins] cpython (3.6): Issue #21449: Removed private function _PyUnicode_CompareWithId.

serhiy.storchaka python-checkins at python.org
Wed Nov 16 08:57:10 EST 2016


https://hg.python.org/cpython/rev/b995a6950139
changeset: 105152:b995a6950139
branch: 3.6
parent: 105150:ff3dacc98b3a
user: Serhiy Storchaka <storchaka at gmail.com>
date: Wed Nov 16 15:56:27 2016 +0200
summary:
 Issue #21449: Removed private function _PyUnicode_CompareWithId.
files:
 Include/unicodeobject.h | 9 ---------
 Objects/unicodeobject.c | 9 ---------
 2 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -2037,15 +2037,6 @@
 );
 
 #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
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11012,15 +11012,6 @@
 }
 
 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;
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /