diff options
author | Damien George <damien.p.george@gmail.com> | 2014-10-03 17:44:14 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-10-03 17:44:14 +0000 |
commit | 42f3de924bc3e285490f5f293955bc6d7e5a0edf (patch) | |
tree | c33a59825957ca5561bb7bb5038575ff052d5245 /py/sequence.c | |
parent | 877dba3e1a76d151c0d93c88bcfaac62ecfe3799 (diff) |
py: Convert [u]int to mp_[u]int_t where appropriate.
Addressing issue #50.
Diffstat (limited to 'py/sequence.c')
-rw-r--r-- | py/sequence.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/sequence.c b/py/sequence.c index 6e92b6b7a..8cc7519be 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -44,7 +44,7 @@ // Implements backend of sequence * integer operation. Assumes elements are // memory-adjacent in sequence. void mp_seq_multiply(const void *items, mp_uint_t item_sz, mp_uint_t len, mp_uint_t times, void *dest) { - for (int i = 0; i < times; i++) { + for (mp_uint_t i = 0; i < times; i++) { uint copy_sz = item_sz * len; memcpy(dest, items, copy_sz); dest = (char*)dest + copy_sz; @@ -185,8 +185,8 @@ bool mp_seq_cmp_objs(mp_uint_t op, const mp_obj_t *items1, mp_uint_t len1, const } } - int len = len1 < len2 ? len1 : len2; - for (int i = 0; i < len; i++) { + mp_uint_t len = len1 < len2 ? len1 : len2; + for (mp_uint_t i = 0; i < len; i++) { // If current elements equal, can't decide anything - go on if (mp_obj_equal(items1[i], items2[i])) { continue; |