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 /py/objarray.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 'py/objarray.c')
-rw-r--r-- | py/objarray.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objarray.c b/py/objarray.c index eed21d9463..3251ce969b 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -61,10 +61,10 @@ STATIC mp_obj_t array_construct(char typecode, mp_obj_t initializer) { mp_obj_array_t *array = array_new(typecode, len); - mp_obj_t iterable = rt_getiter(initializer); + mp_obj_t iterable = mp_getiter(initializer); mp_obj_t item; int i = 0; - while ((item = rt_iternext(iterable)) != MP_OBJ_NULL) { + while ((item = mp_iternext(iterable)) != MP_OBJ_NULL) { if (len == 0) { array_append(array, item); } else { @@ -99,8 +99,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_bytearray_obj, mp_builtin_bytearray); STATIC mp_obj_t array_unary_op(int op, mp_obj_t o_in) { mp_obj_array_t *o = o_in; switch (op) { - case RT_UNARY_OP_BOOL: return MP_BOOL(o->len != 0); - case RT_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(o->len); + case MP_UNARY_OP_BOOL: return MP_BOOL(o->len != 0); + case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(o->len); default: return MP_OBJ_NULL; // op not supported } } @@ -108,7 +108,7 @@ STATIC mp_obj_t array_unary_op(int op, mp_obj_t o_in) { STATIC mp_obj_t array_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { mp_obj_array_t *o = lhs; switch (op) { - case RT_BINARY_OP_SUBSCR: + case MP_BINARY_OP_SUBSCR: { uint index = mp_get_index(o->base.type, o->len, rhs, false); return mp_binary_get_val(o->typecode, o->items, index); |