summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-12-10 22:07:04 +0000
committerDamien George <damien.p.george@gmail.com>2014-12-10 22:08:14 +0000
commit969a6b37bfc655609e540053c2bdcce8a6fdc64d (patch)
tree5e7d74f72d702efd07ff6ba6d93d3a10e4e00fd2 /extmod
parentd51107927d53a80835195ba1ac97048c203f05f2 (diff)
py: Make functions static where appropriate.
Diffstat (limited to 'extmod')
-rw-r--r--extmod/moductypes.c6
-rw-r--r--extmod/modure.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index b8f68bf8c..4d2e3f696 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 910166249..b9f262456 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);