c2nim compiles again
This commit is contained in:
parent
3c53c4c2b0
commit
4487b614e1
5 changed files with 15 additions and 10 deletions
|
|
@ -420,7 +420,7 @@ proc newObjRC1(typ: PNimType, size: int): pointer {.compilerRtl.} =
|
|||
if framePtr != nil and framePtr.prev != nil:
|
||||
res.filename = framePtr.prev.filename
|
||||
res.line = framePtr.prev.line
|
||||
res.refcount = rcIncrement # refcount is 1
|
||||
res.refcount = rcIncrement # refcount is 1
|
||||
sysAssert(isAllocatedPtr(gch.region, res), "newObj: 3")
|
||||
when logGC: writeCell("new cell", res)
|
||||
gcTrace(res, csAllocated)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ proc copyStrLast(s: NimString, start, last: int): NimString {.compilerProc.} =
|
|||
c_memcpy(result.data, addr(s.data[start]), len * sizeof(Char))
|
||||
result.data[len] = '\0'
|
||||
else:
|
||||
result = mnewString(0)
|
||||
result = rawNewString(len)
|
||||
|
||||
proc copyStr(s: NimString, start: int): NimString {.compilerProc.} =
|
||||
result = copyStrLast(s, start, s.len-1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue