Don't depend on string.h in codegen (#8299)

This commit is contained in:
Yuriy Glukhov 2018-07-13 18:41:59 +03:00 • committed by Andreas Rumpf
commit dfe3f16022
9 changed files with 87 additions and 54 deletions

View file

@ -32,7 +32,7 @@ proc cmpStrings(a, b: NimString): int {.inline, compilerProc.} =
let blen = b.len
let minlen = min(alen, blen)
if minlen > 0:
result = c_memcmp(addr a.data, addr b.data, minlen.csize)
result = nimCmpMem(addr a.data, addr b.data, minlen.csize)
if result == 0:
result = alen - blen
else: