diff options
author | Araq <rumpf_a@web.de> | 2017-12-01 11:20:50 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-12-01 11:20:50 +0100 |
commit | d27c0b219249b2584fc7a3f175adfde862ca701f (patch) | |
tree | c220170ecf4a6495e0cc9e78fbc5759383e02727 /lib/system/mmdisp.nim | |
parent | 96b7c2481cf792b9003844aea435b7bb937ec44d (diff) | |
download | Nim-d27c0b219249b2584fc7a3f175adfde862ca701f.tar.gz |
make asyncdispatch compile with the foreign GCs
Diffstat (limited to 'lib/system/mmdisp.nim')
-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 |