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/objint.c | |
parent | 877dba3e1a76d151c0d93c88bcfaac62ecfe3799 (diff) |
py: Convert [u]int to mp_[u]int_t where appropriate.
Addressing issue #50.
Diffstat (limited to 'py/objint.c')
-rw-r--r-- | py/objint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objint.c b/py/objint.c index 240be3283..e0fa7d661 100644 --- a/py/objint.c +++ b/py/objint.c @@ -88,8 +88,8 @@ void mp_obj_int_print(void (*print)(void *env, const char *fmt, ...), void *env, // enough, a dynamic one will be allocated. char stack_buf[sizeof(mp_int_t) * 4]; char *buf = stack_buf; - int buf_size = sizeof(stack_buf); - int fmt_size; + mp_uint_t buf_size = sizeof(stack_buf); + mp_uint_t fmt_size; char *str = mp_obj_int_formatted(&buf, &buf_size, &fmt_size, self_in, 10, NULL, '\0', '\0'); print(env, "%s", str); @@ -135,7 +135,7 @@ STATIC uint int_as_str_size_formatted(uint base, const char *prefix, char comma) // // The resulting formatted string will be returned from this function and the // formatted size will be in *fmt_size. -char *mp_obj_int_formatted(char **buf, int *buf_size, int *fmt_size, mp_const_obj_t self_in, +char *mp_obj_int_formatted(char **buf, mp_uint_t *buf_size, mp_uint_t *fmt_size, mp_const_obj_t self_in, int base, const char *prefix, char base_char, char comma) { fmt_int_t num; if (MP_OBJ_IS_SMALL_INT(self_in)) { |