diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-03 13:25:24 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-03 13:25:24 +0100 |
commit | 40f3c026823f8951a2fa04e9c7fc93c75bc27bec (patch) | |
tree | c9c8210654c7114f00c5234a8481d9b5fbd28ce0 /py/sequence.c | |
parent | 065aba587571150074ea79483ffa72c0fe6bc8c8 (diff) | |
download | micropython-40f3c026823f8951a2fa04e9c7fc93c75bc27bec.tar.gz micropython-40f3c026823f8951a2fa04e9c7fc93c75bc27bec.zip |
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50.
Diffstat (limited to 'py/sequence.c')
-rw-r--r-- | py/sequence.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/py/sequence.c b/py/sequence.c index df82488119..e180bf1d69 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -53,9 +53,9 @@ void mp_seq_multiply(const void *items, uint item_sz, uint len, uint times, void #if MICROPY_PY_BUILTINS_SLICE -bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, mp_bound_slice_t *indexes) { +bool mp_seq_get_fast_slice_indexes(mp_uint_t len, mp_obj_t slice, mp_bound_slice_t *indexes) { mp_obj_t ostart, ostop, ostep; - machine_int_t start, stop; + mp_int_t start, stop; mp_obj_slice_get(slice, &ostart, &ostop, &ostep); if (ostart == mp_const_none) { @@ -103,8 +103,8 @@ bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, mp_bound_ #endif mp_obj_t mp_seq_extract_slice(uint len, const mp_obj_t *seq, mp_bound_slice_t *indexes) { - machine_int_t start = indexes->start, stop = indexes->stop; - machine_int_t step = indexes->step; + mp_int_t start = indexes->start, stop = indexes->stop; + mp_int_t step = indexes->step; mp_obj_t res = mp_obj_new_list(0, NULL); @@ -231,7 +231,7 @@ mp_obj_t mp_seq_index_obj(const mp_obj_t *items, uint len, uint n_args, const mp } } - for (machine_uint_t i = start; i < stop; i++) { + for (mp_uint_t i = start; i < stop; i++) { if (mp_obj_equal(items[i], value)) { // Common sense says this cannot overflow small int return MP_OBJ_NEW_SMALL_INT(i); @@ -242,7 +242,7 @@ mp_obj_t mp_seq_index_obj(const mp_obj_t *items, uint len, uint n_args, const mp } mp_obj_t mp_seq_count_obj(const mp_obj_t *items, uint len, mp_obj_t value) { - machine_uint_t count = 0; + mp_uint_t count = 0; for (uint i = 0; i < len; i++) { if (mp_obj_equal(items[i], value)) { count++; |