Add initSequenceOfCap proc
This commit is contained in:
parent
71b6d4c017
commit
466a8d3af4
|
@ -317,6 +317,10 @@ proc initSequence*(len: Natural = 0; E = void): Preserve[E] =
|
|||
## Create a Preserves sequence value.
|
||||
Preserve[E](kind: pkSequence, sequence: newSeq[Preserve[E]](len))
|
||||
|
||||
proc initSequenceOfCap*(cap: Natural; E = void): Preserve[E] =
|
||||
## Create a Preserves sequence value.
|
||||
Preserve[E](kind: pkSequence, sequence: newSeqOfCap[Preserve[E]](cap))
|
||||
|
||||
proc initSet*(E = void): Preserve[E] = Preserve[E](kind: pkSet)
|
||||
## Create a Preserves set value.
|
||||
|
||||
|
|
Loading…
Reference in New Issue