aboutsummaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-01-29 14:27:33 +1100
committerDamien George <damien.p.george@gmail.com>2020-04-05 15:02:06 +1000
commit85858e72dfdc3e941c2e620e94de05ad663138b1 (patch)
treed801c11e07380213b7e2abbb3066e2a90636369c /py/compile.c
parent92c83bd16b55daf81157100243ded6d7d0e56538 (diff)
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.
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c2
1 files changed, 1 insertions, 1 deletions
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);