summary refs log tree commit diff stats
path: root/lib/system/mmdisp.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-12-01 11:20:50 +0100
committerAraq <rumpf_a@web.de>2017-12-01 11:20:50 +0100
commitd27c0b219249b2584fc7a3f175adfde862ca701f (patch)
treec220170ecf4a6495e0cc9e78fbc5759383e02727 /lib/system/mmdisp.nim
parent96b7c2481cf792b9003844aea435b7bb937ec44d (diff)
downloadNim-d27c0b219249b2584fc7a3f175adfde862ca701f.tar.gz
make asyncdispatch compile with the foreign GCs
Diffstat (limited to 'lib/system/mmdisp.nim')
-rw-r--r--lib/system/mmdisp.nim8
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