Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d06eeb4

Browse files
committed
merge
2 parents b31e3f7 + b1b915c commit d06eeb4

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

  • Objects/stringlib

Objects/stringlib/eq.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ unicode_eq(PyObject *aa, PyObject *bb)
2020
return 1;
2121
if (PyUnicode_KIND(a) != PyUnicode_KIND(b))
2222
return 0;
23-
/* Just comparing the first byte is enough to see if a and b differ.
24-
* If they are 2 byte or 4 byte character most differences will happen in
25-
* the lower bytes anyways.
26-
*/
27-
if (PyUnicode_1BYTE_DATA(a)[0] != PyUnicode_1BYTE_DATA(b)[0])
28-
return 0;
29-
if (PyUnicode_KIND(a) == PyUnicode_1BYTE_KIND &&
30-
PyUnicode_GET_LENGTH(a) == 1)
31-
return 1;
3223
return memcmp(PyUnicode_1BYTE_DATA(a), PyUnicode_1BYTE_DATA(b),
3324
PyUnicode_GET_LENGTH(a) * PyUnicode_KIND(a)) == 0;
3425
}

0 commit comments

Comments
 (0)