diff options
author | Damien George <damien.p.george@gmail.com> | 2016-03-14 22:40:39 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-03-14 22:40:39 +0000 |
commit | 2a1cca20b1e1a93c86c8c3a3254ab7150c85ac08 (patch) | |
tree | 1a651210327a64e9d236adc61134ffd9622b9bb7 /py/objclosure.c | |
parent | e7cd1699df95d201369417b36cc4b65063d5c763 (diff) |
py: Fix passing of some wide int types to printf varg format list.
Passing an mp_uint_t to a %d printf format is incorrect for builds where
mp_uint_t is larger than word size (eg a nanboxing build). This patch
adds some simple casting to int in these cases.
Diffstat (limited to 'py/objclosure.c')
-rw-r--r-- | py/objclosure.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objclosure.c b/py/objclosure.c index d556b3b8a..4b37d2dd1 100644 --- a/py/objclosure.c +++ b/py/objclosure.c @@ -65,7 +65,7 @@ STATIC void closure_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_ mp_obj_closure_t *o = MP_OBJ_TO_PTR(o_in); mp_print_str(print, "<closure "); mp_obj_print_helper(print, o->fun, PRINT_REPR); - mp_printf(print, " at %p, n_closed=%u ", o, o->n_closed); + mp_printf(print, " at %p, n_closed=%u ", o, (int)o->n_closed); for (mp_uint_t i = 0; i < o->n_closed; i++) { if (o->closed[i] == MP_OBJ_NULL) { mp_print_str(print, "(nil)"); |