summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorRoy Hooper <rhooper@toybox.ca>2019-11-26 18:39:08 -0500
committerRoy Hooper <rhooper@toybox.ca>2019-11-26 18:39:08 -0500
commit56720eae0a9eb6fe8845cf20eb1298c3fb68a373 (patch)
treeef0776247da69096bebc9fba54ce79e94b202844 /shared-bindings
parent0b0aa5c5cf69189a619c6888fdd62c3eee063480 (diff)
remove unnecessary intermediate mp_obj_subscr wrapper
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/random/__init__.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-bindings/random/__init__.c b/shared-bindings/random/__init__.c
index 83698eac5..fdef91443 100644
--- a/shared-bindings/random/__init__.c
+++ b/shared-bindings/random/__init__.c
@@ -145,7 +145,7 @@ STATIC mp_obj_t random_choice(mp_obj_t seq) {
if (len == 0) {
mp_raise_IndexError(translate("empty sequence"));
}
- return mp_obj_subscr(seq, mp_obj_new_int(shared_modules_random_randrange(0, len, 1)), MP_OBJ_SENTINEL);
+ return mp_obj_subscr(seq, mp_obj_new_int(shared_modules_random_randrange(0, len, 1)), MP_OBJ_SENTINEL, seq);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(random_choice_obj, random_choice);