Skip to content

Commit eff359e

Browse files
committed
py: Expose mp_obj_list_remove as a public function.
1 parent 59d1491 commit eff359e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

py/obj.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ mp_int_t mp_obj_tuple_hash(mp_obj_t self_in);
533533
struct _mp_obj_list_t;
534534
void mp_obj_list_init(struct _mp_obj_list_t *o, mp_uint_t n);
535535
mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg);
536+
mp_obj_t mp_obj_list_remove(mp_obj_t self_in, mp_obj_t value);
536537
void mp_obj_list_get(mp_obj_t self_in, mp_uint_t *len, mp_obj_t **items);
537538
void mp_obj_list_set_len(mp_obj_t self_in, mp_uint_t len);
538539
void mp_obj_list_store(mp_obj_t self_in, mp_obj_t index, mp_obj_t value);

py/objlist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ STATIC mp_obj_t list_insert(mp_obj_t self_in, mp_obj_t idx, mp_obj_t obj) {
390390
return mp_const_none;
391391
}
392392

393-
STATIC mp_obj_t list_remove(mp_obj_t self_in, mp_obj_t value) {
393+
mp_obj_t mp_obj_list_remove(mp_obj_t self_in, mp_obj_t value) {
394394
assert(MP_OBJ_IS_TYPE(self_in, &mp_type_list));
395395
mp_obj_t args[] = {self_in, value};
396396
args[1] = list_index(2, args);
@@ -421,7 +421,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_count_obj, list_count);
421421
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(list_index_obj, 2, 4, list_index);
422422
STATIC MP_DEFINE_CONST_FUN_OBJ_3(list_insert_obj, list_insert);
423423
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(list_pop_obj, 1, 2, list_pop);
424-
STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_remove_obj, list_remove);
424+
STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_remove_obj, mp_obj_list_remove);
425425
STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_reverse_obj, list_reverse);
426426
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(list_sort_obj, 1, mp_obj_list_sort);
427427

0 commit comments

Comments
 (0)