From ebde0b8a095653ed3073cf821c44e91ec0897a41 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 19 Jan 2014 00:47:40 +0000 Subject: Tiny optimisation in objlist.c; a new test for inheritance. --- py/objlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'py') diff --git a/py/objlist.c b/py/objlist.c index 4822c7b68..e499d9423 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -44,16 +44,16 @@ static mp_obj_t list_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp switch (n_args) { case 0: // return a new, empty list - return rt_build_list(0, NULL); + return mp_obj_new_list(0, NULL); case 1: { // make list from iterable mp_obj_t iterable = rt_getiter(args[0]); - mp_obj_t list = rt_build_list(0, NULL); + mp_obj_t list = mp_obj_new_list(0, NULL); mp_obj_t item; while ((item = rt_iternext(iterable)) != mp_const_stop_iteration) { - rt_list_append(list, item); + mp_obj_list_append(list, item); } return list; } -- cgit v1.2.3