Linux abi take 3 (#5692)
* avoid generating object fields for imported types * fix some abi/type issues for linux_amd64
This commit is contained in:
parent
926563f0e6
commit
e512358bc9
7 changed files with 86 additions and 35 deletions
|
|
@ -26,8 +26,14 @@ proc c_memset(p: pointer, value: cint, size: csize): pointer {.
|
|||
proc c_strcmp(a, b: cstring): cint {.
|
||||
importc: "strcmp", header: "<string.h>", noSideEffect.}
|
||||
|
||||
type
|
||||
C_JmpBuf {.importc: "jmp_buf", header: "<setjmp.h>".} = object
|
||||
when defined(linux) and defined(amd64):
|
||||
type
|
||||
C_JmpBuf {.importc: "jmp_buf", header: "<setjmp.h>", bycopy.} = object
|
||||
abi: array[200 div sizeof(clong), clong]
|
||||
else:
|
||||
type
|
||||
C_JmpBuf {.importc: "jmp_buf", header: "<setjmp.h>".} = object
|
||||
|
||||
|
||||
when defined(windows):
|
||||
const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue