gc:destructors further progress
This commit is contained in:
parent
ab38c075f8
commit
7d82df20be
6 changed files with 52 additions and 24 deletions
|
|
@ -85,7 +85,7 @@ type
|
|||
proc newSeqPayload(cap, elemSize: int): pointer {.compilerRtl.} =
|
||||
# we have to use type erasure here as Nim does not support generic
|
||||
# compilerProcs. Oh well, this will all be inlined anyway.
|
||||
if cap <= 0:
|
||||
if cap > 0:
|
||||
let region = getLocalAllocator()
|
||||
var p = cast[ptr PayloadBase](region.alloc(region, cap * elemSize + sizeof(int) + sizeof(Allocator)))
|
||||
p.region = region
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue