diff options
Diffstat (limited to 'unix/modffi.c')
-rw-r--r-- | unix/modffi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unix/modffi.c b/unix/modffi.c index f1b219987b..eca3f9131b 100644 --- a/unix/modffi.c +++ b/unix/modffi.c @@ -51,6 +51,10 @@ * s - as argument, the same as "p", as return value, causes string * to be allocated and returned, instead of pointer value. * + * TODO: + * O - mp_obj_t, passed as is (mostly useful as callback param) + * C - callback function + * * Note: all constraint specified by typecode can be not enforced at this time, * but may be later. */ @@ -100,12 +104,15 @@ STATIC ffi_type *char2ffi_type(char c) switch (c) { case 'b': return &ffi_type_schar; case 'B': return &ffi_type_uchar; + case 'h': return &ffi_type_sshort; + case 'H': return &ffi_type_ushort; case 'i': return &ffi_type_sint; case 'I': return &ffi_type_uint; case 'l': return &ffi_type_slong; case 'L': return &ffi_type_ulong; case 'f': return &ffi_type_float; case 'd': return &ffi_type_double; + case 'C': // (*)() case 'P': // const void* case 'p': // void* case 's': return &ffi_type_pointer; |