summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-30 14:04:14 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-30 14:04:14 +0100
commit9c4cbe2ac0ae4c51270f21ba9c974dd24f6b9d55 (patch)
treeff5df738435c6e6734a235aeb6d383457623dc6b /py/runtime.c
parent93965e726fb307739c31b0fc61d972391ffba677 (diff)
downloadmicropython-9c4cbe2ac0ae4c51270f21ba9c974dd24f6b9d55.tar.gz
micropython-9c4cbe2ac0ae4c51270f21ba9c974dd24f6b9d55.zip
py: Make tuple and list use mp_int_t/mp_uint_t.
Part of code cleanup, to resolve issue #50.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 68033675b1..69727e0203 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -593,7 +593,7 @@ mp_obj_t mp_call_method_n_kw_var(bool have_self, uint n_args_n_kw, const mp_obj_
// optimise the case of a tuple and list
// get the items
- uint len;
+ mp_uint_t len;
mp_obj_t *items;
mp_obj_get_array(pos_seq, &len, &items);
@@ -689,7 +689,7 @@ mp_obj_t mp_call_method_n_kw_var(bool have_self, uint n_args_n_kw, const mp_obj_
// unpacked items are stored in reverse order into the array pointed to by items
void mp_unpack_sequence(mp_obj_t seq_in, uint num, mp_obj_t *items) {
- uint seq_len;
+ mp_uint_t seq_len;
if (MP_OBJ_IS_TYPE(seq_in, &mp_type_tuple) || MP_OBJ_IS_TYPE(seq_in, &mp_type_list)) {
mp_obj_t *seq_items;
if (MP_OBJ_IS_TYPE(seq_in, &mp_type_tuple)) {
@@ -732,7 +732,7 @@ void mp_unpack_ex(mp_obj_t seq_in, uint num_in, mp_obj_t *items) {
uint num_left = num_in & 0xff;
uint num_right = (num_in >> 8) & 0xff;
DEBUG_OP_printf("unpack ex %d %d\n", num_left, num_right);
- uint seq_len;
+ mp_uint_t seq_len;
if (MP_OBJ_IS_TYPE(seq_in, &mp_type_tuple) || MP_OBJ_IS_TYPE(seq_in, &mp_type_list)) {
mp_obj_t *seq_items;
if (MP_OBJ_IS_TYPE(seq_in, &mp_type_tuple)) {
@@ -773,7 +773,7 @@ void mp_unpack_ex(mp_obj_t seq_in, uint num_in, mp_obj_t *items) {
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
mp_obj_list_append(rest, item);
}
- uint rest_len;
+ mp_uint_t rest_len;
mp_obj_t *rest_items;
mp_obj_list_get(rest, &rest_len, &rest_items);
if (rest_len < num_right) {