aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2019-01-28 09:36:25 -0600
committerGanesh Viswanathan <dev@genotrance.com>2019-01-28 09:36:25 -0600
commit45c3487500659975c28b3cae0a6aa11348eab768 (patch)
tree71b67ed5fb19e798b94721770344c049e8fe4509 /tests
parentb86a128456858c2669a4e7aab0899fb792b56c56 (diff)
downloadnimterop-45c3487500659975c28b3cae0a6aa11348eab768.tar.gz
nimterop-45c3487500659975c28b3cae0a6aa11348eab768.zip
Fix skip bug on _, parent in Symbol
Diffstat (limited to 'tests')
-rw-r--r--tests/include/test.h2
-rw-r--r--tests/tnimterop_c.nim7
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()