From a4ff401f50b5c4ac36043f2681db96645dd9bcce Mon Sep 17 00:00:00 2001 From: flywind Date: Thu, 13 Jan 2022 08:51:39 +0800 Subject: [PATCH] change the signature of addr --- lib/system.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index 4f9e303378..1fa7635740 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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