diff options
| author | Roy Hooper <rhooper@toybox.ca> | 2019-11-26 18:39:08 -0500 |
|---|---|---|
| committer | Roy Hooper <rhooper@toybox.ca> | 2019-11-26 18:39:08 -0500 |
| commit | 56720eae0a9eb6fe8845cf20eb1298c3fb68a373 (patch) | |
| tree | ef0776247da69096bebc9fba54ce79e94b202844 /extmod | |
| parent | 0b0aa5c5cf69189a619c6888fdd62c3eee063480 (diff) | |
remove unnecessary intermediate mp_obj_subscr wrapper
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/modurandom.c | 2 | ||||
| -rw-r--r-- | extmod/vfs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/extmod/modurandom.c b/extmod/modurandom.c index 1512a3fd4..101c80cf8 100644 --- a/extmod/modurandom.c +++ b/extmod/modurandom.c @@ -150,7 +150,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_urandom_randint_obj, mod_urandom_randint); STATIC mp_obj_t mod_urandom_choice(mp_obj_t seq) { mp_int_t len = mp_obj_get_int(mp_obj_len(seq)); if (len > 0) { - return mp_obj_subscr(seq, mp_obj_new_int(yasmarang_randbelow(len)), MP_OBJ_SENTINEL); + return mp_obj_subscr(seq, mp_obj_new_int(yasmarang_randbelow(len)), MP_OBJ_SENTINEL, seq); } else { nlr_raise(mp_obj_new_exception(&mp_type_IndexError)); } diff --git a/extmod/vfs.c b/extmod/vfs.c index 7d6e6999b..7599739e0 100644 --- a/extmod/vfs.c +++ b/extmod/vfs.c @@ -373,7 +373,7 @@ mp_obj_t mp_vfs_listdir(size_t n_args, const mp_obj_t *args) { mp_obj_t dir_list = mp_obj_new_list(0, NULL); mp_obj_t next; while ((next = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - mp_obj_list_append(dir_list, mp_obj_subscr(next, MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_SENTINEL)); + mp_obj_list_append(dir_list, mp_obj_subscr(next, MP_OBJ_NEW_SMALL_INT(0), MP_OBJ_SENTINEL, next)); } return dir_list; } |
