diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-10 21:46:47 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-10 21:46:47 +0000 |
commit | d46ca25757b9021809946bb7274376c410b699eb (patch) | |
tree | 0b263aae2500ec3c96730ac1a01c0f84fc532de4 /py | |
parent | 8c2b333affea7445c457c5247df047947bed9b53 (diff) |
Fix some int casting that failed on 64 bit architecture.
Diffstat (limited to 'py')
-rw-r--r-- | py/sequence.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/sequence.c b/py/sequence.c index d8cfd9f3e..f5310737a 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -155,7 +155,7 @@ mp_obj_t mp_seq_index_obj(const mp_obj_t *items, uint len, uint n_args, const mp } } - for (uint i = start; i < stop; i++) { + for (machine_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); @@ -166,7 +166,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) { - uint count = 0; + machine_uint_t count = 0; for (uint i = 0; i < len; i++) { if (mp_obj_equal(items[i], value)) { count++; |