summary refs log tree commit diff stats
path: root/tests/dll/nimhcr_unit.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-05-30 22:29:38 +0300
committerGitHub <noreply@github.com>2023-05-30 21:29:38 +0200
commit20446b437bd6c35006fab78ed5e3bdd6f8056774 (patch)
tree8b7b3535d9cb46d4d420a2f6a460033bfdce05ac /tests/dll/nimhcr_unit.nim
parenta9385a6b4ab0862512992b2adf75460cf0c4ce74 (diff)
downloadNim-20446b437bd6c35006fab78ed5e3bdd6f8056774.tar.gz
make `proc` not implicitly convert to `pointer` with a preview define (#21953)
* test `proc` not converting to `pointer`

* ignore define for now to test

* remove cstring

* fixes, changelog
Diffstat (limited to 'tests/dll/nimhcr_unit.nim')
-rw-r--r--tests/dll/nimhcr_unit.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/dll/nimhcr_unit.nim b/tests/dll/nimhcr_unit.nim
index 0b924bdf7..249f3f9f1 100644
--- a/tests/dll/nimhcr_unit.nim
+++ b/tests/dll/nimhcr_unit.nim
@@ -106,14 +106,14 @@ macro carryOutTests(callingConv: untyped): untyped =
       echo `procName`, " implementation #1 ", x
       return x + 1
 
-    let fp1 = cast[F](hcrRegisterProc("dummy_module", `procName`, `p1`))
+    let fp1 = cast[F](hcrRegisterProc("dummy_module", `procName`, cast[pointer](`p1`)))
     echo fp1(10)
 
     proc `p2`(x: int): int {.placeholder.} =
       echo `procName`, " implementation #2 ", x
       return x + 2
 
-    let fp2 = cast[F](hcrRegisterProc("dummy_module", `procName`, `p2`))
+    let fp2 = cast[F](hcrRegisterProc("dummy_module", `procName`, cast[pointer](`p2`)))
     echo fp1(20)
     echo fp2(20)
 
@@ -121,7 +121,7 @@ macro carryOutTests(callingConv: untyped): untyped =
       echo `procName`, " implementation #3 ", x
       return x + 3
 
-    let fp3 = cast[F](hcrRegisterProc("dummy_module", `procName`, `p3`))
+    let fp3 = cast[F](hcrRegisterProc("dummy_module", `procName`, cast[pointer](`p3`)))
     echo fp1(30)
     echo fp2(30)
     echo fp3(30)