Skip to content

Commit d4e9de2

Browse files
committed
Use Byte.compareUnsigned
1 parent fdf52a3 commit d4e9de2

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/bytes

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/bytes/BytesNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ protected boolean doCmp(byte[] selfArray, int selfLength, byte[] otherArray, int
972972
return shortcutLengthResult();
973973
}
974974
for (int i = 0; i < Math.min(selfLength, otherLength); i++) {
975-
compareResult = Integer.compare(Byte.toUnsignedInt(selfArray[i]), Byte.toUnsignedInt(otherArray[i]));
975+
compareResult = Byte.compareUnsigned(selfArray[i], otherArray[i]);
976976
if (compareResult != 0) {
977977
break;
978978
}

0 commit comments

Comments
 (0)