mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 00:24:16 +00:00
(cherry picked from commit 89be5be03e)
This commit is contained in:
@@ -45,9 +45,9 @@ proc nimCmpMem*(a, b: pointer, size: Natural): cint {.compilerproc, nonReloadabl
|
||||
if d != 0: return d
|
||||
inc i
|
||||
|
||||
proc nimCStrLen*(a: cstring): csize_t {.compilerproc, nonReloadable, inline.} =
|
||||
proc nimCStrLen*(a: cstring): int {.compilerproc, nonReloadable, inline.} =
|
||||
when useLibC:
|
||||
c_strlen(a)
|
||||
cast[int](c_strlen(a))
|
||||
else:
|
||||
var a = cast[ptr byte](a)
|
||||
while a[] != 0:
|
||||
|
||||
Reference in New Issue
Block a user