Plugin support

This commit is contained in:
Ganesh Viswanathan 2019-01-24 22:44:16 -06:00 • committed by genotrance
commit d8c75a43f7
8 changed files with 72 additions and 19 deletions

View file

@ -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