diff options
Diffstat (limited to 'extmod')
-rw-r--r-- | extmod/moductypes.c | 6 | ||||
-rw-r--r-- | extmod/modure.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c index b8f68bf8c1..4d2e3f6964 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -559,7 +559,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_ob /// \function addressof() /// Return address of object's data (applies to object providing buffer /// interface). -mp_obj_t uctypes_struct_addressof(mp_obj_t buf) { +STATIC mp_obj_t uctypes_struct_addressof(mp_obj_t buf) { mp_buffer_info_t bufinfo; mp_get_buffer_raise(buf, &bufinfo, MP_BUFFER_READ); return mp_obj_new_int((mp_int_t)bufinfo.buf); @@ -570,7 +570,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(uctypes_struct_addressof_obj, uctypes_struct_addressof /// Capture memory at given address of given size as bytearray. Memory is /// captured by reference (and thus memory pointed by bytearray may change /// or become invalid at later time). Use bytes_at() to capture by value. -mp_obj_t uctypes_struct_bytearray_at(mp_obj_t ptr, mp_obj_t size) { +STATIC mp_obj_t uctypes_struct_bytearray_at(mp_obj_t ptr, mp_obj_t size) { return mp_obj_new_bytearray_by_ref(mp_obj_int_get_truncated(size), (void*)mp_obj_int_get_truncated(ptr)); } MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytearray_at_obj, uctypes_struct_bytearray_at); @@ -579,7 +579,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytearray_at_obj, uctypes_struct_bytear /// Capture memory at given address of given size as bytes. Memory is /// captured by value, i.e. copied. Use bytearray_at() to capture by reference /// ("zero copy"). -mp_obj_t uctypes_struct_bytes_at(mp_obj_t ptr, mp_obj_t size) { +STATIC mp_obj_t uctypes_struct_bytes_at(mp_obj_t ptr, mp_obj_t size) { return mp_obj_new_bytes((void*)mp_obj_int_get_truncated(ptr), mp_obj_int_get_truncated(size)); } MP_DEFINE_CONST_FUN_OBJ_2(uctypes_struct_bytes_at_obj, uctypes_struct_bytes_at); diff --git a/extmod/modure.c b/extmod/modure.c index 910166249c..b9f2624563 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -175,7 +175,7 @@ STATIC const mp_obj_type_t re_type = { .locals_dict = (mp_obj_t)&re_locals_dict, }; -mp_obj_t mod_re_compile(uint n_args, const mp_obj_t *args) { +STATIC mp_obj_t mod_re_compile(uint n_args, const mp_obj_t *args) { const char *re_str = mp_obj_str_get_str(args[0]); int size = re1_5_sizecode(re_str); mp_obj_re_t *o = m_new_obj_var(mp_obj_re_t, char, size); |