Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
eff359e1
Commit
eff359e1
authored
Feb 21, 2015
by
Damien George
Browse files
py: Expose mp_obj_list_remove as a public function.
parent
59d14914
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/obj.h
View file @
eff359e1
...
...
@@ -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
);
...
...
py/objlist.c
View file @
eff359e1
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment