diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-27 23:07:37 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-04-28 00:33:21 +0300 |
commit | 48bf6b3bd0a839f4b31b9902c234c61fff0da9a2 (patch) | |
tree | f165b2a8617f2dd67145cf5d5ca7581fee0f41a3 /py | |
parent | 708c07325007148d8e553b20df3f9110cedb58ab (diff) | |
download | micropython-48bf6b3bd0a839f4b31b9902c234c61fff0da9a2.tar.gz micropython-48bf6b3bd0a839f4b31b9902c234c61fff0da9a2.zip |
objlist: Use static small int constructor.
Diffstat (limited to 'py')
-rw-r--r-- | py/objlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objlist.c b/py/objlist.c index 350ad2ca25..277fce828d 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -196,7 +196,7 @@ STATIC mp_obj_t list_pop(uint n_args, const mp_obj_t *args) { if (self->len == 0) { nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, "pop from empty list")); } - uint index = mp_get_index(self->base.type, self->len, n_args == 1 ? mp_obj_new_int(-1) : args[1], false); + uint index = mp_get_index(self->base.type, self->len, n_args == 1 ? MP_OBJ_NEW_SMALL_INT(-1) : args[1], false); mp_obj_t ret = self->items[index]; self->len -= 1; memcpy(self->items + index, self->items + index + 1, (self->len - index) * sizeof(mp_obj_t)); |