diff options
-rw-r--r-- | lib/system/mmdisp.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim index 9af36c7b8..d65d8a10e 100644 --- a/lib/system/mmdisp.nim +++ b/lib/system/mmdisp.nim @@ -571,3 +571,11 @@ when not declared(nimNewSeqOfCap): cast[PGenericSeq](result).reserved = cap {.pop.} + +when not declared(ForeignCell): + type ForeignCell* = object + data*: pointer + + proc protect*(x: pointer): ForeignCell = ForeignCell(data: x) + proc dispose*(x: ForeignCell) = discard + proc isNotForeign*(x: ForeignCell): bool = false |