diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-30 13:35:08 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-30 13:35:08 +0100 |
commit | d17926db710189db97a49e9b2e72d782fc404231 (patch) | |
tree | 406396ee6f3010511a606dd4ea3ed5a817d959eb /unix/ffi.c | |
parent | 09d207785c77c85c957471b064ceebe0d2ee0a23 (diff) | |
download | micropython-d17926db710189db97a49e9b2e72d782fc404231.tar.gz micropython-d17926db710189db97a49e9b2e72d782fc404231.zip |
Rename rt_* to mp_*.
Mostly just a global search and replace. Except rt_is_true which
becomes mp_obj_is_true.
Still would like to tidy up some of the names, but this will do for now.
Diffstat (limited to 'unix/ffi.c')
-rw-r--r-- | unix/ffi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/unix/ffi.c b/unix/ffi.c index 9a4c03572f..71fb0b66ab 100644 --- a/unix/ffi.c +++ b/unix/ffi.c @@ -128,10 +128,10 @@ STATIC mp_obj_t ffimod_func(uint n_args, const mp_obj_t *args) { o->func = sym; o->rettype = *rettype; - mp_obj_t iterable = rt_getiter(args[3]); + mp_obj_t iterable = mp_getiter(args[3]); mp_obj_t item; int i = 0; - while ((item = rt_iternext(iterable)) != MP_OBJ_NULL) { + while ((item = mp_iternext(iterable)) != MP_OBJ_NULL) { o->params[i++] = get_ffi_type(item); } @@ -149,7 +149,7 @@ STATIC void call_py_func(ffi_cif *cif, void *ret, void** args, mp_obj_t func) { for (int i = 0; i < cif->nargs; i++) { pyargs[i] = mp_obj_new_int(*(int*)args[i]); } - mp_obj_t res = rt_call_function_n_kw(func, cif->nargs, 0, pyargs); + mp_obj_t res = mp_call_function_n_kw(func, cif->nargs, 0, pyargs); *(ffi_arg*)ret = mp_obj_int_get(res); } @@ -165,10 +165,10 @@ 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 = rt_getiter(paramtypes_in); + mp_obj_t iterable = mp_getiter(paramtypes_in); mp_obj_t item; int i = 0; - while ((item = rt_iternext(iterable)) != MP_OBJ_NULL) { + while ((item = mp_iternext(iterable)) != MP_OBJ_NULL) { o->params[i++] = get_ffi_type(item); } @@ -348,8 +348,8 @@ MP_DEFINE_CONST_FUN_OBJ_2(mod_ffi_as_bytearray_obj, mod_ffi_as_bytearray); void ffi_init() { mp_obj_t m = mp_obj_new_module(QSTR_FROM_STR_STATIC("ffi")); - rt_store_attr(m, MP_QSTR_open, (mp_obj_t)&mod_ffi_open_obj); - rt_store_attr(m, QSTR_FROM_STR_STATIC("callback"), (mp_obj_t)&mod_ffi_callback_obj); + mp_store_attr(m, MP_QSTR_open, (mp_obj_t)&mod_ffi_open_obj); + mp_store_attr(m, QSTR_FROM_STR_STATIC("callback"), (mp_obj_t)&mod_ffi_callback_obj); // there would be as_bytes, but bytes currently is value, not reference type! - rt_store_attr(m, QSTR_FROM_STR_STATIC("as_bytearray"), (mp_obj_t)&mod_ffi_as_bytearray_obj); + mp_store_attr(m, QSTR_FROM_STR_STATIC("as_bytearray"), (mp_obj_t)&mod_ffi_as_bytearray_obj); } |