From fb997526de2aec135199d4d088f89bfc0c6b827d Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Thu, 24 Jan 2019 22:44:16 -0600 Subject: Plugin support --- tests/tnimterop_c.nim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim index f0d5ed5..095fe20 100644 --- a/tests/tnimterop_c.nim +++ b/tests/tnimterop_c.nim @@ -8,6 +8,13 @@ cDefine("FORCE") cIncludeDir "$projpath/include" cAddSearchDir "$projpath/include" cCompile cSearchPath("test.c") + +cPlugin: + import strutils + + proc onSymbol*(sym: string): string {.exportc, dynlib.} = + return sym.strip(chars={'_'}) + cImport cSearchPath "test.h" check TEST_INT == 512 -- cgit v1.2.3