mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
fix growObj() with strings
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user