summaryrefslogtreecommitdiff
path: root/py/objlist.c
diff options
context:
space:
mode:
authorsommersoft <sommersoft@gmail.com>2019-08-19 21:23:27 -0500
committersommersoft <sommersoft@gmail.com>2019-08-19 21:23:27 -0500
commit1b2996a75ea4ba6d6d8b20cebb749d5f18a83049 (patch)
tree1e4cfe0343280227f36d5fcbbc4e45983cb6c0f0 /py/objlist.c
parent17190ae63e8a5fb43c99ca7f1f91bf684bdbc16e (diff)
parent0ddfbb0c20432458cc8020ab5ad7538e6813b60b (diff)
Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice
Diffstat (limited to 'py/objlist.c')
-rw-r--r--py/objlist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/objlist.c b/py/objlist.c
index 558c4c611..ea38e64e5 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -68,6 +68,11 @@ STATIC mp_obj_t list_extend_from_iter(mp_obj_t list, mp_obj_t iterable) {
return list;
}
+mp_obj_t mp_obj_new_list_from_iter(mp_obj_t iterable) {
+ mp_obj_t list = mp_obj_new_list(0, NULL);
+ return list_extend_from_iter(list, iterable);
+}
+
STATIC mp_obj_t list_make_new(const mp_obj_type_t *type_in, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
(void)type_in;
mp_arg_check_num(n_args, kw_args, 0, 1, false);