summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objint.c b/py/objint.c
index 740e7ea948..645b269966 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -446,7 +446,7 @@ STATIC mp_obj_t int_to_bytes(size_t n_args, const mp_obj_t *args) {
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_VAR_BETWEEN(int_to_bytes_obj, 3, 4, int_to_bytes);