diff options
-rw-r--r-- | py/obj.h | 1 | ||||
-rw-r--r-- | py/objlist.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -533,6 +533,7 @@ mp_int_t mp_obj_tuple_hash(mp_obj_t self_in); struct _mp_obj_list_t; void mp_obj_list_init(struct _mp_obj_list_t *o, mp_uint_t n); mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg); +mp_obj_t mp_obj_list_remove(mp_obj_t self_in, mp_obj_t value); void mp_obj_list_get(mp_obj_t self_in, mp_uint_t *len, mp_obj_t **items); void mp_obj_list_set_len(mp_obj_t self_in, mp_uint_t len); void mp_obj_list_store(mp_obj_t self_in, mp_obj_t index, mp_obj_t value); diff --git a/py/objlist.c b/py/objlist.c index 4768263011..e9af3652b7 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -390,7 +390,7 @@ STATIC mp_obj_t list_insert(mp_obj_t self_in, mp_obj_t idx, mp_obj_t obj) { return mp_const_none; } -STATIC mp_obj_t list_remove(mp_obj_t self_in, mp_obj_t value) { +mp_obj_t mp_obj_list_remove(mp_obj_t self_in, mp_obj_t value) { assert(MP_OBJ_IS_TYPE(self_in, &mp_type_list)); mp_obj_t args[] = {self_in, value}; args[1] = list_index(2, args); @@ -421,7 +421,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_count_obj, list_count); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(list_index_obj, 2, 4, list_index); STATIC MP_DEFINE_CONST_FUN_OBJ_3(list_insert_obj, list_insert); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(list_pop_obj, 1, 2, list_pop); -STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_remove_obj, list_remove); +STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_remove_obj, mp_obj_list_remove); STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_reverse_obj, list_reverse); STATIC MP_DEFINE_CONST_FUN_OBJ_KW(list_sort_obj, 1, mp_obj_list_sort); |