diff options
author | stijn <stinos@zoho.com> | 2015-01-02 12:05:44 +0100 |
---|---|---|
committer | stijn <stinos@zoho.com> | 2015-01-02 16:53:54 +0100 |
commit | fbfd3554fac29c886ccfed1b8796ed8852d32442 (patch) | |
tree | 9ee9a817f0842475c7579bd740914eb69435cbb9 | |
parent | 8dec62a1a41f1c48aa7bdd3848c0f46a62de4f29 (diff) | |
download | micropython-fbfd3554fac29c886ccfed1b8796ed8852d32442.tar.gz micropython-fbfd3554fac29c886ccfed1b8796ed8852d32442.zip |
msvc: Fix unresolved mp_arg_error_terse_mismatch since 7f23384
The compiler treats `if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE)` as
a normal statement and generates assembly for it in degug mode as if MICROPY_ERROR_REPORTING
is an actual symbol instead of a preprocessor definition.
As such linking fails because mp_arg_error_terse_mismatch is not defined when
MICROPY_ERROR_REPORTING_TERSE is detailed or normal.
-rw-r--r-- | py/argcheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/argcheck.c b/py/argcheck.c index f9a4eb7f46..243ea60567 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -139,7 +139,7 @@ void mp_arg_parse_all_kw_array(mp_uint_t n_pos, mp_uint_t n_kw, const mp_obj_t * mp_arg_parse_all(n_pos, args, &kw_args, n_allowed, allowed, out_vals); } -#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE +#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE || _MSC_VER NORETURN void mp_arg_error_terse_mismatch(void) { nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "argument num/types mismatch")); } |