make asyncdispatch compile with the foreign GCs
This commit is contained in:
parent
96b7c2481c
commit
d27c0b2192
1 changed files with 8 additions and 0 deletions
|
|
@ -571,3 +571,11 @@ when not declared(nimNewSeqOfCap):
|
||||||
cast[PGenericSeq](result).reserved = cap
|
cast[PGenericSeq](result).reserved = cap
|
||||||
|
|
||||||
{.pop.}
|
{.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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue