From 85858e72dfdc3e941c2e620e94de05ad663138b1 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Wed, 29 Jan 2020 14:27:33 +1100 Subject: py/objexcept: Allow compression of exception message text. The decompression of error-strings is only done if the string is accessed via printing or via er.args. Tests are added for this feature to ensure the decompression works. --- py/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/compile.c') diff --git a/py/compile.c b/py/compile.c index 750cb9c3d..5daeb6e18 100644 --- a/py/compile.c +++ b/py/compile.c @@ -197,7 +197,7 @@ STATIC void compile_error_set_line(compiler_t *comp, mp_parse_node_t pn) { } } -STATIC void compile_syntax_error(compiler_t *comp, mp_parse_node_t pn, const char *msg) { +STATIC void compile_syntax_error(compiler_t *comp, mp_parse_node_t pn, mp_rom_error_text_t msg) { // only register the error if there has been no other error if (comp->compile_error == MP_OBJ_NULL) { comp->compile_error = mp_obj_new_exception_msg(&mp_type_SyntaxError, msg); -- cgit v1.2.3