From abd26b7ca63665d1335b21cda85cd2822beb8804 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 6 Dec 2023 10:14:29 +0900 Subject: [PATCH] mruby-bin-mrbc/mrbc.c: replace `mrbc_` prefix by `mrb_ccontext` This is a most confusion file because it contained both `mrbc_` from "mruby compiler" (e.g. mrbc_args) and `mrbc_` from "mruby compiler context". --- mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c index 88cb51ca0..8856beab6 100644 --- a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +++ b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c @@ -198,7 +198,7 @@ cleanup(mrb_state *mrb, struct mrbc_args *args) static int partial_hook(struct mrb_parser_state *p) { - mrbc_context *c = p->cxt; + mrb_ccontext *c = p->cxt; struct mrbc_args *args = (struct mrbc_args*)c->partial_data; const char *fn; @@ -220,13 +220,13 @@ partial_hook(struct mrb_parser_state *p) static mrb_value load_file(mrb_state *mrb, struct mrbc_args *args) { - mrbc_context *c; + mrb_ccontext *c; mrb_value result; char *input = args->argv[args->idx]; FILE *infile; mrb_bool need_close = FALSE; - c = mrbc_context_new(mrb); + c = mrb_ccontext_new(mrb); if (args->verbose) c->dump_result = TRUE; c->no_exec = TRUE; @@ -242,16 +242,16 @@ load_file(mrb_state *mrb, struct mrbc_args *args) return mrb_nil_value(); } } - mrbc_filename(mrb, c, input); + mrb_ccontext_filename(mrb, c, input); args->idx++; if (args->idx < args->argc) { need_close = FALSE; - mrbc_partial_hook(mrb, c, partial_hook, (void*)args); + mrb_ccontext_partial_hook(mrb, c, partial_hook, (void*)args); } result = mrb_load_file_cxt(mrb, infile, c); if (need_close) fclose(infile); - mrbc_context_free(mrb, c); + mrb_ccontext_free(mrb, c); if (mrb_undef_p(result)) { return mrb_nil_value(); }