fixes #1832
This commit is contained in:
parent
18823a315e
commit
4932415742
3 changed files with 28 additions and 3 deletions
|
|
@ -210,6 +210,14 @@ proc incrSeq(seq: PGenericSeq, elemSize: int): PGenericSeq {.compilerProc.} =
|
|||
GenericSeqSize))
|
||||
inc(result.len)
|
||||
|
||||
proc incrSeqV2(seq: PGenericSeq, elemSize: int): PGenericSeq {.compilerProc.} =
|
||||
# incrSeq version 2
|
||||
result = seq
|
||||
if result.len >= result.space:
|
||||
result.reserved = resize(result.space)
|
||||
result = cast[PGenericSeq](growObj(result, elemSize * result.reserved +
|
||||
GenericSeqSize))
|
||||
|
||||
proc setLengthSeq(seq: PGenericSeq, elemSize, newLen: int): PGenericSeq {.
|
||||
compilerRtl.} =
|
||||
result = seq
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue