fix #71; bug fixes in types.nim
This commit is contained in:
parent
31ec7987db
commit
343024738a
1 changed files with 31 additions and 2 deletions
|
|
@ -1,4 +1,33 @@
|
|||
#[
|
||||
TODO:
|
||||
this should pull as few dependencies as needed by the wrapper, one option is, for the types that carry a dependency, wrap the type declaration inside something like:
|
||||
```
|
||||
when defined(nimteropNeeds_va_list):
|
||||
type
|
||||
va_list* {.importc, header:"<stdarg.h>".} = object
|
||||
```
|
||||
|
||||
TODO:
|
||||
nimterop should replace the generated wrappers with the nim-idiomatic version, eg:
|
||||
```
|
||||
proc mylib(a: ptrdiff_t) => proc mylib(a: ByteAddress)
|
||||
```
|
||||
]#
|
||||
|
||||
from std/time_t import nil # for time_t
|
||||
|
||||
export time_t
|
||||
|
||||
type
|
||||
time_t* = int32
|
||||
ptrdiff_t* = ByteAddress
|
||||
va_list* {.importc: "va_list", header:"<stdarg.h>".} = object
|
||||
|
||||
type
|
||||
va_list* {.importc, header:"<stdarg.h>".} = object
|
||||
|
||||
when defined(c):
|
||||
# http://www.cplusplus.com/reference/cwchar/wchar_t/ In C++, wchar_t is a distinct fundamental type (and thus it is not defined in <cwchar> nor any other header).
|
||||
type
|
||||
wchar_t* {.importc, header:"<cwchar>".} = object
|
||||
elif defined(cpp):
|
||||
type
|
||||
wchar_t* {.importc.} = object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue