some bugfixes; no system.$ for object as it breaks code
This commit is contained in:
parent
6cbd5bb017
commit
c87e1c96ad
4 changed files with 11 additions and 10 deletions
|
|
@ -73,12 +73,13 @@ proc cstrToNimstr(str: CString): NimString {.compilerRtl.} =
|
|||
result = toNimstr(str, c_strlen(str))
|
||||
|
||||
proc copyString(src: NimString): NimString {.compilerRtl.} =
|
||||
if (src.reserved and seqShallowFlag) != 0:
|
||||
result = src
|
||||
elif src != nil:
|
||||
result = rawNewString(src.space)
|
||||
result.len = src.len
|
||||
c_memcpy(result.data, src.data, (src.len + 1) * sizeof(Char))
|
||||
if src != nil:
|
||||
if (src.reserved and seqShallowFlag) != 0:
|
||||
result = src
|
||||
else:
|
||||
result = rawNewString(src.space)
|
||||
result.len = src.len
|
||||
c_memcpy(result.data, src.data, (src.len + 1) * sizeof(Char))
|
||||
|
||||
proc copyStringRC1(src: NimString): NimString {.compilerRtl.} =
|
||||
if src != nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue