Kouhei Sutou
null+****@clear*****
Sun Aug 27 23:21:55 JST 2017
Kouhei Sutou 2017-08-27 23:21:55 +0900 (Sun, 27 Aug 2017) New Revision: e0353c6510375b7c658075e4faddf9e05bf347b4 https://github.com/groonga/groonga/commit/e0353c6510375b7c658075e4faddf9e05bf347b4 Message: Delay allocation Modified files: lib/mrb/mrb_eval_context.c Modified: lib/mrb/mrb_eval_context.c (+2 -1) =================================================================== --- lib/mrb/mrb_eval_context.c 2017-08-27 23:21:15 +0900 (a6bdc393a) +++ lib/mrb/mrb_eval_context.c 2017-08-27 23:21:55 +0900 (cd23c4eb1) @@ -37,6 +37,8 @@ eval_context_compile(mrb_state *mrb, mrb_value self) struct mrb_parser_state *parser; struct RProc *proc; + mrb_get_args(mrb, "s", &script, &script_length); + compile_ctx = mrbc_context_new(mrb); if (!compile_ctx) { mrb_raise(mrb, E_RUNTIME_ERROR, @@ -44,7 +46,6 @@ eval_context_compile(mrb_state *mrb, mrb_value self) } compile_ctx->capture_errors = TRUE; - mrb_get_args(mrb, "s", &script, &script_length); parser = mrb_parse_nstring(mrb, script, script_length, compile_ctx); if (!parser) { mrbc_context_free(mrb, compile_ctx); -------------- next part -------------- HTML����������������������������...下载