py/bc: Don't include mp_decode_uint funcs when not needed.

These are now only needed when persistent code is disabled.
This commit is contained in:
Damien George 2019-09-26 11:48:07 +10:00
parent fd9b7efe39
commit 1d0423419b

View File

@ -40,6 +40,8 @@
#define DEBUG_printf(...) (void)0 #define DEBUG_printf(...) (void)0
#endif #endif
#if !MICROPY_PERSISTENT_CODE
mp_uint_t mp_decode_uint(const byte **ptr) { mp_uint_t mp_decode_uint(const byte **ptr) {
mp_uint_t unum = 0; mp_uint_t unum = 0;
byte val; byte val;
@ -70,6 +72,8 @@ const byte *mp_decode_uint_skip(const byte *ptr) {
return ptr; return ptr;
} }
#endif
STATIC NORETURN void fun_pos_args_mismatch(mp_obj_fun_bc_t *f, size_t expected, size_t given) { STATIC NORETURN void fun_pos_args_mismatch(mp_obj_fun_bc_t *f, size_t expected, size_t given) {
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
// generic message, used also for other argument issues // generic message, used also for other argument issues