aboutsummaryrefslogtreecommitdiff
path: root/py/nativeglue.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-05-29 21:14:24 +1000
committerDamien George <damien.p.george@gmail.com>2019-05-29 21:14:24 +1000
commitbff4e130099e2ec17478bb00f7eaa5d85fb763dc (patch)
tree7df179ff99b43171660833021cd784b4bc41015a /py/nativeglue.c
parent6f75c4f3cd393131579db70cdf0b35d1fe5b95ab (diff)
py/nativeglue: Make private glue funs all static, remove commented code.
Diffstat (limited to 'py/nativeglue.c')
-rw-r--r--py/nativeglue.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/py/nativeglue.c b/py/nativeglue.c
index c810f31e6..8f38ecd16 100644
--- a/py/nativeglue.c
+++ b/py/nativeglue.c
@@ -97,7 +97,7 @@ mp_obj_t mp_native_to_obj(mp_uint_t val, mp_uint_t type) {
#if MICROPY_EMIT_NATIVE
-mp_obj_dict_t *mp_native_swap_globals(mp_obj_dict_t *new_globals) {
+STATIC mp_obj_dict_t *mp_native_swap_globals(mp_obj_dict_t *new_globals) {
if (new_globals == NULL) {
// Globals were the originally the same so don't restore them
return NULL;
@@ -113,13 +113,13 @@ mp_obj_dict_t *mp_native_swap_globals(mp_obj_dict_t *new_globals) {
// wrapper that accepts n_args and n_kw in one argument
// (native emitter can only pass at most 3 arguments to a function)
-mp_obj_t mp_native_call_function_n_kw(mp_obj_t fun_in, size_t n_args_kw, const mp_obj_t *args) {
+STATIC mp_obj_t mp_native_call_function_n_kw(mp_obj_t fun_in, size_t n_args_kw, const mp_obj_t *args) {
return mp_call_function_n_kw(fun_in, n_args_kw & 0xff, (n_args_kw >> 8) & 0xff, args);
}
// wrapper that makes raise obj and raises it
// END_FINALLY opcode requires that we don't raise if o==None
-void mp_native_raise(mp_obj_t o) {
+STATIC void mp_native_raise(mp_obj_t o) {
if (o != MP_OBJ_NULL && o != mp_const_none) {
nlr_raise(mp_make_raise_obj(o));
}
@@ -245,10 +245,4 @@ const void *const mp_fun_table[MP_F_NUMBER_OF] = {
mp_native_yield_from,
};
-/*
-void mp_f_vector(mp_fun_kind_t fun_kind) {
- (mp_f_table[fun_kind])();
-}
-*/
-
#endif // MICROPY_EMIT_NATIVE