py: Convert [u]int to mp_[u]int_t where appropriate.

Addressing issue #50.
This commit is contained in:
Damien George
2014-10-03 17:44:14 +00:00
parent 877dba3e1a
commit 42f3de924b
25 changed files with 58 additions and 80 deletions

View File

@@ -81,7 +81,7 @@ STATIC uint namedtuple_count_fields(const char *namedef) {
STATIC int namedtuple_find_field(const char *name, const char *namedef) {
int id = 0;
int len = strlen(name);
size_t len = strlen(name);
while (namedef) {
if (memcmp(name, namedef, len) == 0) {
namedef += len;
@@ -101,9 +101,9 @@ STATIC void namedtuple_print(void (*print)(void *env, const char *fmt, ...), voi
print(env, "%s(", qstr_str(o->tuple.base.type->name));
const char *fields = ((mp_obj_namedtuple_type_t*)o->tuple.base.type)->fields;
for (int i = 0; i < o->tuple.len; i++) {
for (mp_uint_t i = 0; i < o->tuple.len; i++) {
if (i > 0) {
print(env, ", ");
print(env, ", ");
}
const char *next = fields;