summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/file.c4
-rw-r--r--unix/gccollect.c6
-rw-r--r--unix/main.c6
-rw-r--r--unix/modffi.c6
4 files changed, 11 insertions, 11 deletions
diff --git a/unix/file.c b/unix/file.c
index 4a11d24bde..02b8aff186 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -49,7 +49,7 @@ typedef struct _mp_obj_fdfile_t {
} mp_obj_fdfile_t;
#ifdef MICROPY_CPYTHON_COMPAT
-void check_fd_is_open(const mp_obj_fdfile_t *o) {
+STATIC void check_fd_is_open(const mp_obj_fdfile_t *o) {
if (o->fd < 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "I/O operation on closed file"));
}
@@ -123,7 +123,7 @@ STATIC mp_obj_t fdfile_close(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_close_obj, fdfile_close);
-mp_obj_t fdfile___exit__(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t fdfile___exit__(mp_uint_t n_args, const mp_obj_t *args) {
return fdfile_close(args[0]);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(fdfile___exit___obj, 4, 4, fdfile___exit__);
diff --git a/unix/gccollect.c b/unix/gccollect.c
index 117c13144f..2c7b81918a 100644
--- a/unix/gccollect.c
+++ b/unix/gccollect.c
@@ -40,7 +40,7 @@ extern char *stack_top;
typedef jmp_buf regs_t;
-void gc_helper_get_regs(regs_t arr) {
+STATIC void gc_helper_get_regs(regs_t arr) {
setjmp(arr);
}
@@ -86,7 +86,7 @@ void gc_helper_get_regs(regs_t arr) {
#ifdef __i386__
typedef mp_uint_t regs_t[4];
-void gc_helper_get_regs(regs_t arr) {
+STATIC void gc_helper_get_regs(regs_t arr) {
register long ebx asm ("ebx");
register long esi asm ("esi");
register long edi asm ("edi");
@@ -101,7 +101,7 @@ void gc_helper_get_regs(regs_t arr) {
#if defined(__thumb2__) || defined(__thumb__) || defined(__arm__)
typedef mp_uint_t regs_t[10];
-void gc_helper_get_regs(regs_t arr) {
+STATIC void gc_helper_get_regs(regs_t arr) {
register long r4 asm ("r4");
register long r5 asm ("r5");
register long r6 asm ("r6");
diff --git a/unix/main.c b/unix/main.c
index 2a0dc864c4..8a564dbfa5 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -239,7 +239,7 @@ STATIC int do_str(const char *str) {
return execute_from_lexer(lex, MP_PARSE_FILE_INPUT, false);
}
-int usage(char **argv) {
+STATIC int usage(char **argv) {
printf(
"usage: %s [<opts>] [-X <implopt>] [-c <command>] [<filename>]\n"
"Options:\n"
@@ -269,7 +269,7 @@ int usage(char **argv) {
}
// Process options which set interpreter init options
-void pre_process_options(int argc, char **argv) {
+STATIC void pre_process_options(int argc, char **argv) {
for (int a = 1; a < argc; a++) {
if (argv[a][0] == '-') {
if (strcmp(argv[a], "-X") == 0) {
@@ -318,7 +318,7 @@ void pre_process_options(int argc, char **argv) {
}
}
-void set_sys_argv(char *argv[], int argc, int start_arg) {
+STATIC void set_sys_argv(char *argv[], int argc, int start_arg) {
for (int i = start_arg; i < argc; i++) {
mp_obj_list_append(mp_sys_argv, MP_OBJ_NEW_QSTR(qstr_from_str(argv[i])));
}
diff --git a/unix/modffi.c b/unix/modffi.c
index 6f87789290..b268bb364f 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -300,7 +300,7 @@ STATIC void ffifunc_print(void (*print)(void *env, const char *fmt, ...), void *
print(env, "<ffifunc %p>", self->func);
}
-mp_obj_t ffifunc_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t ffifunc_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
mp_obj_ffifunc_t *self = self_in;
assert(n_kw == 0);
assert(n_args == self->cif.nargs);
@@ -416,12 +416,12 @@ STATIC const mp_obj_type_t opaque_type = {
};
*/
-mp_obj_t mod_ffi_open(mp_uint_t n_args, const mp_obj_t *args) {
+STATIC mp_obj_t mod_ffi_open(mp_uint_t n_args, const mp_obj_t *args) {
return ffimod_make_new((mp_obj_t)&ffimod_type, n_args, 0, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_ffi_open_obj, 1, 2, mod_ffi_open);
-mp_obj_t mod_ffi_as_bytearray(mp_obj_t ptr, mp_obj_t size) {
+STATIC mp_obj_t mod_ffi_as_bytearray(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(mod_ffi_as_bytearray_obj, mod_ffi_as_bytearray);