added system.disarm (experimental)
This commit is contained in:
parent
3ceb258ebf
commit
8201db81b2
1 changed files with 7 additions and 0 deletions
|
|
@ -1657,6 +1657,13 @@ else:
|
||||||
new(r)
|
new(r)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
template disarm*(x: typed) =
|
||||||
|
## Useful for ``disarming`` dangling pointers explicitly for the
|
||||||
|
## --newruntime. Regardless of whether --newruntime is used or not
|
||||||
|
## this sets the pointer or callback ``x`` to ``nil``. This is an
|
||||||
|
## experimental API!
|
||||||
|
x = nil
|
||||||
|
|
||||||
proc `of`*[T, S](x: typeDesc[T], y: typeDesc[S]): bool {.magic: "Of", noSideEffect.}
|
proc `of`*[T, S](x: typeDesc[T], y: typeDesc[S]): bool {.magic: "Of", noSideEffect.}
|
||||||
proc `of`*[T, S](x: T, y: typeDesc[S]): bool {.magic: "Of", noSideEffect.}
|
proc `of`*[T, S](x: T, y: typeDesc[S]): bool {.magic: "Of", noSideEffect.}
|
||||||
proc `of`*[T, S](x: T, y: S): bool {.magic: "Of", noSideEffect.}
|
proc `of`*[T, S](x: T, y: S): bool {.magic: "Of", noSideEffect.}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue