Fix skip bug on _, parent in Symbol

This commit is contained in:
Ganesh Viswanathan 2019-01-28 09:36:25 -06:00
commit 45c3487500
7 changed files with 23 additions and 15 deletions

View file

@ -129,6 +129,8 @@ ENUM6 test_call_etype_ptr6();
union union3 test_call_utype3();
UNION3 test_call_etype_ptr3();
typedef struct _Kernel { char name; } *Kernel;
#ifdef __cplusplus
}
#endif

View file

@ -13,7 +13,10 @@ cPlugin:
import strutils
proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
sym.name = sym.name.strip(chars={'_'})
if sym.name == "_Kernel":
sym.name = "uKernel"
else:
sym.name = sym.name.strip(chars={'_'})
cImport cSearchPath "test.h"
@ -130,6 +133,8 @@ var
e6p: ENUM6
u3: union3
u3p: UNION3
k: uKernel
kp: Kernel
cAddStdDir()