aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2019-01-27 11:37:33 -0600
committergenotrance <dev@genotrance.com>2019-01-27 22:05:54 -0600
commitf7a77b7ab9c7cae36014e1991245e0d4c1da7099 (patch)
tree1a0f1d8f2669d7b6f83e5b375b758c88593fa4d2 /tests
parenta8b08e1867c6ad130a86d7848b45a5698fdd7699 (diff)
downloadnimterop-f7a77b7ab9c7cae36014e1991245e0d4c1da7099.tar.gz
nimterop-f7a77b7ab9c7cae36014e1991245e0d4c1da7099.zip
Improve onSymbol API
Diffstat (limited to 'tests')
-rw-r--r--tests/tmath.nim4
-rw-r--r--tests/tnimterop_c.nim4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/tmath.nim b/tests/tmath.nim
index 5e98968..a561251 100644
--- a/tests/tmath.nim
+++ b/tests/tmath.nim
@@ -14,8 +14,8 @@ cAddStdDir()
cPlugin:
import strutils
- proc onSymbol*(sym: string): string {.exportc, dynlib.} =
- return sym.strip(chars={'_'})
+ proc onSymbol*(sym: var Symbol): Result {.exportc, dynlib.} =
+ sym.name = sym.name.strip(chars={'_'})
cImport cSearchPath("math.h")
diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim
index 095fe20..c9b4667 100644
--- a/tests/tnimterop_c.nim
+++ b/tests/tnimterop_c.nim
@@ -12,8 +12,8 @@ cCompile cSearchPath("test.c")
cPlugin:
import strutils
- proc onSymbol*(sym: string): string {.exportc, dynlib.} =
- return sym.strip(chars={'_'})
+ proc onSymbol*(sym: var Symbol): Result {.exportc, dynlib.} =
+ sym.name = sym.name.strip(chars={'_'})
cImport cSearchPath "test.h"