diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-06-18 23:46:20 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-06-18 23:46:20 -0400 |
| commit | 35b919185747c42e183ccfc41f99fd370acca450 (patch) | |
| tree | 5c1a383a99c53592c16daed8c61f84a4176d99f0 /py | |
| parent | 1356819de195810da09b5fc051ef5cc9dc21b2f4 (diff) | |
Don't operate directly on bleio objects in shared-bindings: use common_hal
routines instead. Changes made but not yet tested.
Diffstat (limited to 'py')
| -rw-r--r-- | py/circuitpy_defns.mk | 2 | ||||
| -rw-r--r-- | py/obj.h | 1 | ||||
| -rw-r--r-- | py/objlist.c | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index fd43a11a6..435cf2c33 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -308,6 +308,8 @@ $(filter $(SRC_PATTERNS), \ bitbangio/SPI.c \ bitbangio/__init__.c \ board/__init__.c \ + bleio/Address.c \ + bleio/ScanEntry.c \ busio/OneWire.c \ displayio/Bitmap.c \ displayio/ColorConverter.c \ @@ -763,6 +763,7 @@ void mp_obj_tuple_del(mp_obj_t self_in); mp_int_t mp_obj_tuple_hash(mp_obj_t self_in); // list +mp_obj_t mp_obj_list_clear(mp_obj_t self_in); 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, size_t *len, mp_obj_t **items); diff --git a/py/objlist.c b/py/objlist.c index 16ca4b353..558c4c611 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -340,7 +340,7 @@ mp_obj_t mp_obj_list_sort(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ return mp_const_none; } -STATIC mp_obj_t list_clear(mp_obj_t self_in) { +mp_obj_t mp_obj_list_clear(mp_obj_t self_in) { mp_check_self(MP_OBJ_IS_TYPE(self_in, &mp_type_list)); mp_obj_list_t *self = MP_OBJ_TO_PTR(self_in); self->len = 0; @@ -418,7 +418,7 @@ STATIC mp_obj_t list_reverse(mp_obj_t self_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_append_obj, mp_obj_list_append); STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_extend_obj, list_extend); -STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_clear_obj, list_clear); +STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_clear_obj, mp_obj_list_clear); STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_copy_obj, list_copy); 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); |
