fix growObj() with strings
This commit is contained in:
parent
50e96ad939
commit
02ddbae8f6
1 changed files with 2 additions and 0 deletions
|
|
@ -50,12 +50,14 @@ proc rawNewStringNoInit(space: int): NimString {.compilerProc.} =
|
|||
if s < 7: s = 7
|
||||
result = allocStrNoInit(sizeof(TGenericSeq) + s + 1)
|
||||
result.reserved = s
|
||||
result.elemSize = 1
|
||||
|
||||
proc rawNewString(space: int): NimString {.compilerProc.} =
|
||||
var s = space
|
||||
if s < 7: s = 7
|
||||
result = allocStr(sizeof(TGenericSeq) + s + 1)
|
||||
result.reserved = s
|
||||
result.elemSize = 1
|
||||
|
||||
proc mnewString(len: int): NimString {.compilerProc.} =
|
||||
result = rawNewString(len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue