Skip to content

Commit a4ff401

Browse files
committed
change the signature of addr
1 parent ee05ff2 commit a4ff401

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/system.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ when defined(nimHasDeclaredMagic):
190190
else:
191191
proc declaredInScope*(x: untyped): bool {.magic: "DefinedInScope", noSideEffect, compileTime.}
192192

193-
proc `addr`*[T](x: var T): ptr T {.magic: "Addr", noSideEffect.} =
193+
proc `addr`*[T](x: T): ptr T {.magic: "Addr", noSideEffect.} =
194194
## Builtin `addr` operator for taking the address of a memory location.
195195
##
196196
## .. note:: This works for `let` variables or parameters

0 commit comments

Comments
 (0)