mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-10 05:38:10 +00:00
change the signature of addr
This commit is contained in:
@@ -190,7 +190,7 @@ when defined(nimHasDeclaredMagic):
|
||||
else:
|
||||
proc declaredInScope*(x: untyped): bool {.magic: "DefinedInScope", noSideEffect, compileTime.}
|
||||
|
||||
proc `addr`*[T](x: var T): ptr T {.magic: "Addr", noSideEffect.} =
|
||||
proc `addr`*[T](x: T): ptr T {.magic: "Addr", noSideEffect.} =
|
||||
## Builtin `addr` operator for taking the address of a memory location.
|
||||
##
|
||||
## .. note:: This works for `let` variables or parameters
|
||||
|
||||
Reference in New Issue
Block a user