mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-21 18:36:50 +00:00
Merge pull request #8030 from c-blake/devel
hotfix 3221ac0943 broke gc:regions/aka …
This commit is contained in:
@@ -562,7 +562,8 @@ else:
|
||||
when not declared(nimNewSeqOfCap):
|
||||
proc nimNewSeqOfCap(typ: PNimType, cap: int): pointer {.compilerproc.} =
|
||||
when defined(gcRegions):
|
||||
result = newStr(typ, cap, ntfNoRefs notin typ.base.flags)
|
||||
let s = mulInt(cap, typ.base.size) # newStr already adds GenericSeqSize
|
||||
result = newStr(typ, s, ntfNoRefs notin typ.base.flags)
|
||||
else:
|
||||
let s = addInt(mulInt(cap, typ.base.size), GenericSeqSize)
|
||||
when declared(newObjNoInit):
|
||||
|
||||
Reference in New Issue
Block a user