Kouhei Sutou
null+****@clear*****
Sun Aug 27 23:21:15 JST 2017
Kouhei Sutou 2017-08-27 23:21:15 +0900 (Sun, 27 Aug 2017) New Revision: 6b68bc43ffa971c2910c5f1fd47daae60d8d9c4b https://github.com/groonga/groonga/commit/6b68bc43ffa971c2910c5f1fd47daae60d8d9c4b Message: Improve variable name Modified files: lib/mrb/mrb_eval_context.c Modified: lib/mrb/mrb_eval_context.c (+8 -8) =================================================================== --- lib/mrb/mrb_eval_context.c 2017-08-27 23:19:48 +0900 (e3a47a82e) +++ lib/mrb/mrb_eval_context.c 2017-08-27 23:21:15 +0900 (a6bdc393a) @@ -33,21 +33,21 @@ eval_context_compile(mrb_state *mrb, mrb_value self) { char *script; mrb_int script_length; - mrbc_context* ctx; + mrbc_context* compile_ctx; struct mrb_parser_state *parser; struct RProc *proc; - ctx = mrbc_context_new(mrb); - if (!ctx) { + compile_ctx = mrbc_context_new(mrb); + if (!compile_ctx) { mrb_raise(mrb, E_RUNTIME_ERROR, "[mruby][eval][compile] failed to allocate context"); } - ctx->capture_errors = 1; + compile_ctx->capture_errors = TRUE; mrb_get_args(mrb, "s", &script, &script_length); - parser = mrb_parse_nstring(mrb, script, script_length, ctx); + parser = mrb_parse_nstring(mrb, script, script_length, compile_ctx); if (!parser) { - mrbc_context_free(mrb, ctx); + mrbc_context_free(mrb, compile_ctx); mrb_raise(mrb, E_RUNTIME_ERROR, "[mruby][eval][compile] failed to allocate parser"); } @@ -63,7 +63,7 @@ eval_context_compile(mrb_state *mrb, mrb_value self) mrb_str_new_cstr(mrb, error->message)); exception = mrb_obj_new(mrb, E_SYNTAX_ERROR, 1, new_args); mrb_parser_free(parser); - mrbc_context_free(mrb, ctx); + mrbc_context_free(mrb, compile_ctx); mrb_exc_raise(mrb, exception); } @@ -77,7 +77,7 @@ eval_context_compile(mrb_state *mrb, mrb_value self) *iseq = MKOP_AB(OP_RETURN, 1, OP_R_NORMAL); } mrb_parser_free(parser); - mrbc_context_free(mrb, ctx); + mrbc_context_free(mrb, compile_ctx); return mrb_obj_value(proc); } -------------- next part -------------- HTML����������������������������...Download