diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/include/test.h | 2 | ||||
| -rw-r--r-- | tests/tnimterop_c.nim | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/include/test.h b/tests/include/test.h index 29048a7..e85acfd 100644 --- a/tests/include/test.h +++ b/tests/include/test.h @@ -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
\ No newline at end of file diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim index 457db7b..ece78db 100644 --- a/tests/tnimterop_c.nim +++ b/tests/tnimterop_c.nim @@ -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() |
