diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-07 03:54:22 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-07 03:54:22 +0900 |
| commit | e92d4e2680716d3e16a264e46394cb6e458699f9 (patch) | |
| tree | 4b0a9bb35ba4e75126436ce71ad5ece67b7193cd /mrbgems/mruby-bin-mruby/tools | |
| parent | f80401de6c9b7dd9e0676c4414aae7a6e033ac5f (diff) | |
| download | mruby-e92d4e2680716d3e16a264e46394cb6e458699f9.tar.gz mruby-e92d4e2680716d3e16a264e46394cb6e458699f9.zip | |
modified to use irep->reps to reference child ireps. preparation for
removing irep array from mrb_state. note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
Diffstat (limited to 'mrbgems/mruby-bin-mruby/tools')
| -rw-r--r-- | mrbgems/mruby-bin-mruby/tools/mruby/mruby.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c b/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c index 290f9e25d..6b4e5c500 100644 --- a/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +++ b/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c @@ -198,12 +198,12 @@ main(int argc, char **argv) mrb_define_global_const(mrb, "ARGV", ARGV); if (args.mrbfile) { - n = mrb_read_irep_file(mrb, args.rfp); - if (n < 0) { + mrb_irep *irep = mrb_read_irep_file(mrb, args.rfp); + if (!irep) { fprintf(stderr, "failed to load mrb file: %s\n", args.cmdline); } else if (!args.check_syntax) { - mrb_context_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb), 0); + mrb_context_run(mrb, mrb_proc_new(mrb, irep), mrb_top_self(mrb), 0); n = 0; if (mrb->exc) { mrb_print_error(mrb); |
