summaryrefslogtreecommitdiffstatshomepage
path: root/unix/modffi.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/modffi.c')
-rw-r--r--unix/modffi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/modffi.c b/unix/modffi.c
index cf5d5eb2e1..7c87e5b01a 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -110,6 +110,7 @@ STATIC ffi_type *char2ffi_type(char c)
case 'f': return &ffi_type_float;
case 'd': return &ffi_type_double;
#endif
+ case 'O': // mp_obj_t
case 'C': // (*)()
case 'P': // const void*
case 'p': // void*
@@ -153,6 +154,8 @@ STATIC mp_obj_t return_ffi_value(ffi_arg val, char type)
return mp_obj_new_float(*p);
}
#endif
+ case 'O':
+ return (mp_obj_t)val;
default:
return mp_obj_new_int(val);
}