aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nimterop/cimport.nim3
-rw-r--r--nimterop/getters.nim6
-rw-r--r--nimterop/types.nim4
3 files changed, 8 insertions, 5 deletions
diff --git a/nimterop/cimport.nim b/nimterop/cimport.nim
index c5955c6..bb2217c 100644
--- a/nimterop/cimport.nim
+++ b/nimterop/cimport.nim
@@ -4,6 +4,9 @@ const CIMPORT {.used.} = 1
include "."/globals
+import "."/types
+export types
+
proc interpPath(dir: string): string=
# TODO: more robust: needs a DirSep after "$projpath"
result = dir.replace("$projpath", getProjectPath())
diff --git a/nimterop/getters.nim b/nimterop/getters.nim
index 06688a9..cc5b0a2 100644
--- a/nimterop/getters.nim
+++ b/nimterop/getters.nim
@@ -70,11 +70,7 @@ const gTypeMap = {
# floating point
"float": "cfloat",
"double": "cdouble",
- "long double": "clongdouble",
-
- # misc
- "time_t": "int32",
- "ptrdiff_t": "ByteAddress"
+ "long double": "clongdouble"
}.toTable()
proc sanitizePath*(path: string): string =
diff --git a/nimterop/types.nim b/nimterop/types.nim
new file mode 100644
index 0000000..80ba603
--- /dev/null
+++ b/nimterop/types.nim
@@ -0,0 +1,4 @@
+type
+ time_t* = int32
+ ptrdiff_t* = ByteAddress
+ va_list* {.importc: "va_list", header:"<stdarg.h>".} = object \ No newline at end of file