WP27: Calling C
State: Landed · Done: 5 of 5 · Design note: docs/wp27-ffi.md
Stages
- S1:
declare functionwith scalars - S2: the opaque
CPtr - S3:
stringin and out,readCString, a literal-nullCPtr | nullparameter - S4: C structs by a layout declaration
- S4.1:
declare classas a C struct layout, passed by pointer - S4.2:
readStruct, a copy of a C-owned struct
- S4.1:
- S5:
errno:cErrno()innish:unsafe, zeroed before and saved after each C call
Next
Nothing scheduled: every stage is built. What is not planned is below; the note says what would reopen it.
Not planned
string[] as char **, C callbacks, variadic C functions.

