Enable also ptr==ptr optimization in PyUnicode_Compare()

It was already implemented in PyUnicode_RichCompare()
This commit is contained in:
Victor Stinner 2012-10-04 21:53:50 +02:00
parent 6964f4b790
commit 90db9c47dc
2 changed files with 7 additions and 5 deletions

View file

@ -1951,7 +1951,8 @@ PyAPI_FUNC(PyObject *) PyUnicode_Replace(
);
/* Compare two strings and return -1, 0, 1 for less than, equal,
greater than resp. */
greater than resp.
Raise an exception and return -1 on error. */
PyAPI_FUNC(int) PyUnicode_Compare(
PyObject *left, /* Left string */