ast2 fix issue 156 - abstract function pointer

This commit is contained in:
Ganesh Viswanathan 2020-04-07 17:40:59 -05:00
commit 4ccde62d4f
5 changed files with 63 additions and 7 deletions

View file

@ -22,7 +22,8 @@ cPlugin:
proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
sym.name = sym.name.strip(chars={'_'}).replace("__", "_")
cImport cSearchPath("math.h")
const FLAGS {.strdefine.} = ""
cImport(cSearchPath("math.h"), flags = FLAGS)
check sin(5) == -0.9589242746631385
check abs(-5) == 5