some bugfixes; no system.$ for object as it breaks code

This commit is contained in:
Araq 2013-02-24 12:34:50 +01:00
commit c87e1c96ad
4 changed files with 11 additions and 10 deletions

View file

@ -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: