mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 13:07:48 +00:00
added system.disarm (experimental)
This commit is contained in:
@@ -1657,6 +1657,13 @@ else:
|
||||
new(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: T, y: typeDesc[S]): bool {.magic: "Of", noSideEffect.}
|
||||
proc `of`*[T, S](x: T, y: S): bool {.magic: "Of", noSideEffect.}
|
||||
|
||||
Reference in New Issue
Block a user