Skip to content

Commit fbfd355

Browse files
committed
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.
1 parent 8dec62a commit fbfd355

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/argcheck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 *
139139
mp_arg_parse_all(n_pos, args, &kw_args, n_allowed, allowed, out_vals);
140140
}
141141

142-
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
142+
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE || _MSC_VER
143143
NORETURN void mp_arg_error_terse_mismatch(void) {
144144
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "argument num/types mismatch"));
145145
}

0 commit comments

Comments
 (0)