Skip to content

Commit f66df1e

Browse files
committed
py/objint: Extract small int value directly because type is known.
1 parent 6c564aa commit f66df1e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/objint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ char *mp_obj_int_formatted(char **buf, size_t *buf_size, size_t *fmt_size, mp_co
224224
fmt_int_t num;
225225
if (MP_OBJ_IS_SMALL_INT(self_in)) {
226226
// A small int; get the integer value to format.
227-
num = mp_obj_get_int(self_in);
227+
num = MP_OBJ_SMALL_INT_VALUE(self_in);
228228
#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
229229
} else if (MP_OBJ_IS_TYPE(self_in, &mp_type_int)) {
230230
// Not a small int.

0 commit comments

Comments
 (0)