fix compile erors
This commit is contained in:
parent
be62395c47
commit
680b94d463
|
@ -483,8 +483,8 @@ STATIC mp_obj_t int_from_bytes(size_t n_args, const mp_obj_t *pos_args, mp_map_t
|
|||
|
||||
enum { ARG_bytes, ARG_byteorder, ARG_signed };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
{ MP_QSTR_bytes, MP_ARG_REQUIRED | MP_ARG_OBJ },
|
||||
{ MP_QSTR_byteorder, MP_ARG_REQUIRED | MP_ARG_OBJ },
|
||||
{ MP_QSTR_bytes, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = NULL} },
|
||||
{ MP_QSTR_byteorder, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = NULL} },
|
||||
{ MP_QSTR_signed, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
|
||||
};
|
||||
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
||||
|
@ -566,7 +566,7 @@ STATIC mp_obj_t int_to_bytes(size_t n_args, const mp_obj_t *pos_args, mp_map_t *
|
|||
mp_binary_set_int(l, big_endian, data + (big_endian ? (len - l) : 0), val);
|
||||
}
|
||||
|
||||
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
|
||||
return mp_obj_new_bytes_from_vstr(&vstr);
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(int_to_bytes_obj, 3, int_to_bytes);
|
||||
|
||||
|
|
Loading…
Reference in New Issue