mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
avoid casting with this nice macro
This commit is contained in:
parent
c142389218
commit
5fd4bd3796
1 changed files with 1 additions and 2 deletions
|
@ -7358,8 +7358,7 @@ PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
|
|||
|
||||
if (PyUnicode_Check(left) && PyUnicode_Check(right)) {
|
||||
PyObject *v;
|
||||
if (((PyUnicodeObject *) left)->length !=
|
||||
((PyUnicodeObject *) right)->length) {
|
||||
if (PyUnicode_GET_SIZE(left) != PyUnicode_GET_SIZE(right)) {
|
||||
if (op == Py_EQ) {
|
||||
Py_INCREF(Py_False);
|
||||
return Py_False;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue