diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 7 | ||||
-rw-r--r-- | lib/system/arc.nim | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim index a072c5851..4a52a0014 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1606,8 +1606,11 @@ when not defined(js) and defined(nimV2): traceImpl: pointer typeInfoV1: pointer # for backwards compat, usually nil flags: int - when defined(nimPreviewVtables) and not defined(cpp): - vTable: UncheckedArray[pointer] # vtable for types + when defined(gcDestructors): + when defined(cpp): + vTable: ptr UncheckedArray[pointer] # vtable for types + else: + vTable: UncheckedArray[pointer] # vtable for types PNimTypeV2 = ptr TNimTypeV2 proc supportsCopyMem(t: typedesc): bool {.magic: "TypeTrait".} diff --git a/lib/system/arc.nim b/lib/system/arc.nim index 88d21643a..b788ac664 100644 --- a/lib/system/arc.nim +++ b/lib/system/arc.nim @@ -244,7 +244,7 @@ template tearDownForeignThreadGc* = proc isObjDisplayCheck(source: PNimTypeV2, targetDepth: int16, token: uint32): bool {.compilerRtl, inl.} = result = targetDepth <= source.depth and source.display[targetDepth] == token -when defined(nimPreviewVtables) and not defined(cpp): +when defined(gcDestructors): proc nimGetVTable(p: pointer, index: int): pointer {.compilerRtl, inline, raises: [].} = result = cast[ptr PNimTypeV2](p).vTable[index] |