summaryrefslogtreecommitdiffstatshomepage
path: root/unix/modffi.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/modffi.c')
-rw-r--r--unix/modffi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/unix/modffi.c b/unix/modffi.c
index cae16c579a..7a35d61ef4 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -126,8 +126,7 @@ STATIC ffi_type *char2ffi_type(char c)
STATIC ffi_type *get_ffi_type(mp_obj_t o_in)
{
if (MP_OBJ_IS_STR(o_in)) {
- mp_uint_t len;
- const char *s = mp_obj_str_get_data(o_in, &len);
+ const char *s = mp_obj_str_get_str(o_in);
ffi_type *t = char2ffi_type(*s);
if (t != NULL) {
return t;
@@ -194,7 +193,8 @@ STATIC mp_obj_t make_func(mp_obj_t rettype_in, void *func, mp_obj_t argtypes_in)
o->rettype = *rettype;
o->argtypes = argtypes;
- mp_obj_t iterable = mp_getiter(argtypes_in);
+ mp_obj_iter_buf_t iter_buf;
+ mp_obj_t iterable = mp_getiter(argtypes_in, &iter_buf);
mp_obj_t item;
int i = 0;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
@@ -251,7 +251,8 @@ STATIC mp_obj_t mod_ffi_callback(mp_obj_t rettype_in, mp_obj_t func_in, mp_obj_t
o->rettype = *rettype;
- mp_obj_t iterable = mp_getiter(paramtypes_in);
+ mp_obj_iter_buf_t iter_buf;
+ mp_obj_t iterable = mp_getiter(paramtypes_in, &iter_buf);
mp_obj_t item;
int i = 0;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {