py: Make terse_arg_mismatch a global function and use it elsewhere.

Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected.
This commit is contained in:
Damien George
2015-01-01 15:33:50 +00:00
parent 276159e5dd
commit 7f23384d49
4 changed files with 39 additions and 24 deletions

View File

@@ -61,6 +61,7 @@ void mp_deinit(void);
void mp_arg_check_num(mp_uint_t n_args, mp_uint_t n_kw, mp_uint_t n_args_min, mp_uint_t n_args_max, bool takes_kw);
void mp_arg_parse_all(mp_uint_t n_pos, const mp_obj_t *pos, mp_map_t *kws, mp_uint_t n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals);
void mp_arg_parse_all_kw_array(mp_uint_t n_pos, mp_uint_t n_kw, const mp_obj_t *args, mp_uint_t n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals);
NORETURN void mp_arg_error_terse_mismatch(void);
NORETURN void mp_arg_error_unimpl_kw(void);
mp_obj_dict_t *mp_locals_get(void);