mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 04:02:41 +00:00
make asyncdispatch compile with the foreign GCs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user