tyInt tyUint fit target int bit width (#20829)

This commit is contained in:
Bung 2022-12-01 20:34:00 +08:00 • committed by GitHub
commit 658b28dc57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 306 additions and 267 deletions

View file

@ -17,7 +17,7 @@ proc cmpStrings(a, b: string): int {.inline, compilerproc.} =
let blen = b.len
let minlen = min(alen, blen)
if minlen > 0:
result = c_memcmp(unsafeAddr a[0], unsafeAddr b[0], cast[csize_t](minlen))
result = c_memcmp(unsafeAddr a[0], unsafeAddr b[0], cast[csize_t](minlen)).int
if result == 0:
result = alen - blen
else: