diff options
Diffstat (limited to 'lib/system/arc.nim')
-rw-r--r-- | lib/system/arc.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system/arc.nim b/lib/system/arc.nim index b49a6a63b..88d21643a 100644 --- a/lib/system/arc.nim +++ b/lib/system/arc.nim @@ -243,3 +243,8 @@ 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): + proc nimGetVTable(p: pointer, index: int): pointer + {.compilerRtl, inline, raises: [].} = + result = cast[ptr PNimTypeV2](p).vTable[index] |