Fix #36 - va_list and time_t
This commit is contained in:
parent
be1fe6495c
commit
6511145513
3 changed files with 8 additions and 5 deletions
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
4
nimterop/types.nim
Normal file
4
nimterop/types.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
type
|
||||
time_t* = int32
|
||||
ptrdiff_t* = ByteAddress
|
||||
va_list* {.importc: "va_list", header:"<stdarg.h>".} = object
|
||||
Loading…
Add table
Add a link
Reference in a new issue