Commit 2e526ff1 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

modffi: Support return values of mp_obj_t type.

parent 8064892c
......@@ -110,6 +110,7 @@ STATIC ffi_type *char2ffi_type(char c)
case 'f': return &ffi_type_float;
case 'd': return &ffi_type_double;
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);
case 'O':
return (mp_obj_t)val;
return mp_obj_new_int(val);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment