mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-11 22:08:54 +00:00
progress
This commit is contained in:
@@ -115,10 +115,13 @@ proc cstrToNimstr(str: cstring): NimString {.compilerRtl.} =
|
||||
else: toNimStr(str, str.len)
|
||||
|
||||
proc moveString(src: NimString): NimString {.compilerRtl.} =
|
||||
if (src.reserved and strlitFlag) != 0:
|
||||
result = toOwnedCopy(src)
|
||||
else:
|
||||
if src == nil:
|
||||
result = src
|
||||
else:
|
||||
if (src.reserved and strlitFlag) != 0:
|
||||
result = toOwnedCopy(src)
|
||||
else:
|
||||
result = src
|
||||
|
||||
proc copyString(src: NimString): NimString {.compilerRtl.} =
|
||||
## Expects `src` to be initialized (len and terminating zero set)
|
||||
|
||||
Reference in New Issue
Block a user