diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-09-29 10:05:51 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 18:20:29 +0900 |
| commit | 7ca59ecea2c15458e74c699da0629c319299e636 (patch) | |
| tree | 72676f534a3d98db3eba5ff7b35fe08b416dfaf7 | |
| parent | 041351fb05d1e12b74d9fd99796fb47b0b26a886 (diff) | |
| download | mruby-7ca59ecea2c15458e74c699da0629c319299e636.tar.gz mruby-7ca59ecea2c15458e74c699da0629c319299e636.zip | |
Revert e2e6554b56 not to use `MRB_TRY()`; close #5088
`MRB_TRY()` does not work when compiled by C compiler with `cxx_exception`,
due to the mixture of `setjmp()` used by `mirb.c` and `throw` used by
the core. The original intension of e2e6554b56 is to protect code from
signal interruption, but the signal interruption is not well-defined in
mruby anyway.
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index ffe22b885..8fa4fa822 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -525,10 +525,7 @@ main(int argc, char **argv) while (TRUE) { char *utf8; - struct mrb_jmpbuf c_jmp; - MRB_TRY(&c_jmp); - mrb->jmp = &c_jmp; if (args.rfp) { if (fgets(last_code_line, sizeof(last_code_line)-1, args.rfp) != NULL) goto done; @@ -687,11 +684,6 @@ main(int argc, char **argv) } mrb_parser_free(parser); cxt->lineno++; - MRB_CATCH(&c_jmp) { - p(mrb, mrb_obj_value(mrb->exc), 0); - mrb->exc = 0; - } - MRB_END_EXC(&c_jmp); } #ifdef ENABLE_READLINE |
