ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697)

This commit is contained in:
cooldome 2020-10-28 13:00:49 +00:00 • committed by GitHub
commit 0956a99537
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 273 additions and 77 deletions

View file

@ -163,7 +163,7 @@ proc genericDeepCopyAux(dest, src: pointer, mt: PNimType; tab: var PtrTable) =
when defined(nimSeqsV2):
let typ = if mt.base.kind == tyObject: cast[PNimType](cast[ptr PNimTypeV2](s2)[].typeInfoV1)
else: mt.base
let z = nimNewObj(typ.size)
let z = nimNewObj(typ.size, typ.align)
cast[PPointer](dest)[] = z
else:
# this version should work for any other GC: