mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
fixes #3736
This commit is contained in:
@@ -151,7 +151,7 @@ proc `addr`*[T](x: var T): ptr T {.magic: "Addr", noSideEffect.} =
|
||||
## echo cast[ptr char](p)[] # b
|
||||
discard
|
||||
|
||||
proc unsafeAddr*[T](x: var T): ptr T {.magic: "Addr", noSideEffect.} =
|
||||
proc unsafeAddr*[T](x: T): ptr T {.magic: "Addr", noSideEffect.} =
|
||||
## Builtin 'addr' operator for taking the address of a memory location.
|
||||
## This works even for ``let`` variables or parameters for better interop
|
||||
## with C and so it is considered even more unsafe than the ordinary ``addr``.
|
||||
|
||||
Reference in New Issue
Block a user