From 12a5e17afb6a59d1eb0e1ce0444d7e4891f6391b Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 1 Apr 2015 23:31:30 +0100 Subject: py: Add finer configuration of static funcs when not in stackless mode. Also rename call_args_t to mp_call_args_t. --- py/runtime.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'py/runtime.c') diff --git a/py/runtime.c b/py/runtime.c index f6bc7aa846..2bb9a02641 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -577,7 +577,11 @@ mp_obj_t mp_call_method_n_kw(mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *a return mp_call_function_n_kw(args[0], n_args + adjust, n_kw, args + 2 - adjust); } -void mp_call_prepare_args_n_kw_var(bool have_self, mp_uint_t n_args_n_kw, const mp_obj_t *args, call_args_t *out_args) { +// This function only needs to be exposed externally when in stackless mode. +#if !MICROPY_STACKLESS +STATIC +#endif +void mp_call_prepare_args_n_kw_var(bool have_self, mp_uint_t n_args_n_kw, const mp_obj_t *args, mp_call_args_t *out_args) { mp_obj_t fun = *args++; mp_obj_t self = MP_OBJ_NULL; if (have_self) { @@ -723,7 +727,7 @@ void mp_call_prepare_args_n_kw_var(bool have_self, mp_uint_t n_args_n_kw, const } mp_obj_t mp_call_method_n_kw_var(bool have_self, mp_uint_t n_args_n_kw, const mp_obj_t *args) { - call_args_t out_args; + mp_call_args_t out_args; mp_call_prepare_args_n_kw_var(have_self, n_args_n_kw, args, &out_args); mp_obj_t res = mp_call_function_n_kw(out_args.fun, out_args.n_args, out_args.n_kw, out_args.args); -- cgit v1.2.3