Don't depend on string.h in codegen (#8299)
This commit is contained in:
parent
54a85b4ff5
commit
dfe3f16022
9 changed files with 87 additions and 54 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue