summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-04-11 15:16:09 +1000
committerDamien George <damien.p.george@gmail.com>2017-04-11 15:16:09 +1000
commitf66df1efc85fe9fc7fd0b2125792d02001de48bb (patch)
tree98d0c8a01805bbfbd5ded018bc05c75c302a9a25
parent6c564aa408faf5d2769785b7ffc438a489310c3b (diff)
downloadmicropython-f66df1efc85fe9fc7fd0b2125792d02001de48bb.tar.gz
micropython-f66df1efc85fe9fc7fd0b2125792d02001de48bb.zip
py/objint: Extract small int value directly because type is known.
-rw-r--r--py/objint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objint.c b/py/objint.c
index 46f9b16662..719fd4970c 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -224,7 +224,7 @@ char *mp_obj_int_formatted(char **buf, size_t *buf_size, size_t *fmt_size, mp_co
fmt_int_t num;
if (MP_OBJ_IS_SMALL_INT(self_in)) {
// A small int; get the integer value to format.
- num = mp_obj_get_int(self_in);
+ num = MP_OBJ_SMALL_INT_VALUE(self_in);
#if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE
} else if (MP_OBJ_IS_TYPE(self_in, &mp_type_int)) {
// Not a small int.