conditional TGenericSeq extension
This commit is contained in:
parent
8624654c57
commit
b487d4e425
3 changed files with 18 additions and 8 deletions
|
|
@ -50,14 +50,16 @@ proc rawNewStringNoInit(space: int): NimString {.compilerProc.} =
|
|||
if s < 7: s = 7
|
||||
result = allocStrNoInit(sizeof(TGenericSeq) + s + 1)
|
||||
result.reserved = s
|
||||
result.elemSize = 1
|
||||
when defined(gogc):
|
||||
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
|
||||
when defined(gogc):
|
||||
result.elemSize = 1
|
||||
|
||||
proc mnewString(len: int): NimString {.compilerProc.} =
|
||||
result = rawNewString(len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue