py: Change all uint to mp_uint_t in obj.h.
Part of code cleanup, working towards resolving issue #50.
diff --git a/py/builtinimport.c b/py/builtinimport.c
index fad9567..fa3bcde 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -84,7 +84,7 @@
// go through each path looking for a directory or file
for (int i = 0; i < path_num; i++) {
vstr_reset(dest);
- uint p_len;
+ mp_uint_t p_len;
const char *p = mp_obj_str_get_data(path_items[i], &p_len);
if (p_len > 0) {
vstr_add_strn(dest, p, p_len);
@@ -185,8 +185,8 @@
}
}
- uint mod_len;
- const char *mod_str = (const char*)mp_obj_str_get_data(module_name, &mod_len);
+ mp_uint_t mod_len;
+ const char *mod_str = mp_obj_str_get_data(module_name, &mod_len);
if (level != 0) {
// What we want to do here is to take name of current module,
@@ -204,8 +204,8 @@
printf("\n");
#endif
- uint this_name_l;
- const char *this_name = (const char*)mp_obj_str_get_data(this_name_q, &this_name_l);
+ mp_uint_t this_name_l;
+ const char *this_name = mp_obj_str_get_data(this_name_q, &this_name_l);
uint dots_seen = 0;
const char *p = this_name + this_name_l - 1;
@@ -353,5 +353,4 @@
// Otherwise, we need to return top-level package
return top_module_obj;
}
-
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin___import___obj, 1, 5, mp_builtin___import__);