diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-03 21:54:08 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-03 21:54:08 +0900 |
| commit | 85a0cad905faf6377f308f0e596a031cd143f91d (patch) | |
| tree | ff9a7f0b712132e33fd3b99b69301565c3d84a1d | |
| parent | fc27f71289b84f700efc780ae79eea66f212c0c4 (diff) | |
| download | mruby-85a0cad905faf6377f308f0e596a031cd143f91d.tar.gz mruby-85a0cad905faf6377f308f0e596a031cd143f91d.zip | |
use new function mrb_parser_free()
| -rw-r--r-- | src/parse.y | 6 | ||||
| -rw-r--r-- | tools/mrbc/mrbc.c | 2 | ||||
| -rw-r--r-- | tools/mruby/mruby.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/parse.y b/src/parse.y index b0d399a98..2b69ac726 100644 --- a/src/parse.y +++ b/src/parse.y @@ -4853,7 +4853,7 @@ load_exec(mrb_state *mrb, parser_state *p) int n; if (!p) { - mrb_pool_close(p->pool); + mrb_parser_free(p); return mrb_nil_value(); } if (p->capture_errors && (!p->tree || p->nerr)) { @@ -4862,11 +4862,11 @@ load_exec(mrb_state *mrb, parser_state *p) n = snprintf(buf, sizeof(buf), "line %d: %s\n", p->error_buffer[0].lineno, p->error_buffer[0].message); mrb->exc = (struct RObject*)mrb_object(mrb_exc_new(mrb, E_SYNTAX_ERROR, buf, n)); - mrb_pool_close(p->pool); + mrb_parser_free(p); return mrb_nil_value(); } n = mrb_generate_code(mrb, p->tree); - mrb_pool_close(p->pool); + mrb_parser_free(p); if (n < 0) { mrb->exc = (struct RObject*)mrb_object(mrb_exc_new(mrb, E_SCRIPT_ERROR, "codegen error", 13)); return mrb_nil_value(); diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index 9b69244e5..55e2fcf32 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -183,7 +183,7 @@ main(int argc, char **argv) parser_dump(mrb, p->tree, 0); n = mrb_generate_code(mrb, p->tree); - mrb_pool_close(p->pool); + mrb_parser_free(p); if (args.verbose) codedump_all(mrb, n); diff --git a/tools/mruby/mruby.c b/tools/mruby/mruby.c index b4b37516b..3628e79c9 100644 --- a/tools/mruby/mruby.c +++ b/tools/mruby/mruby.c @@ -184,7 +184,7 @@ main(int argc, char **argv) parser_dump(mrb, p->tree, 0); n = mrb_generate_code(mrb, p->tree); - mrb_pool_close(p->pool); + mrb_parser_free(p); } if (n >= 0) { |
