diff options
Diffstat (limited to 'py/modstruct.c')
-rw-r--r-- | py/modstruct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/modstruct.c b/py/modstruct.c index 8122a96685..8c0cafda07 100644 --- a/py/modstruct.c +++ b/py/modstruct.c @@ -160,7 +160,7 @@ STATIC mp_obj_t struct_unpack(mp_obj_t fmt_in, mp_obj_t data_in) { } MP_DEFINE_CONST_FUN_OBJ_2(struct_unpack_obj, struct_unpack); -STATIC mp_obj_t struct_pack(uint n_args, mp_obj_t *args) { +STATIC mp_obj_t struct_pack(mp_uint_t n_args, const mp_obj_t *args) { // TODO: "The arguments must match the values required by the format exactly." const char *fmt = mp_obj_str_get_str(args[0]); char fmt_type = get_fmt_type(&fmt); @@ -169,7 +169,7 @@ STATIC mp_obj_t struct_pack(uint n_args, mp_obj_t *args) { mp_obj_t res = mp_obj_str_builder_start(&mp_type_bytes, size, &p); memset(p, 0, size); - for (uint i = 1; i < n_args; i++) { + for (mp_uint_t i = 1; i < n_args; i++) { mp_uint_t sz = 1; if (unichar_isdigit(*fmt)) { sz = get_fmt_num(&fmt); |