Changeset 331 for EcnlProtoTool/trunk/mruby-1.3.0/src/load.c
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-1.3.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-1.3.0/src/load.c
r321 r331 8 8 #include <stdlib.h> 9 9 #include <string.h> 10 #include "mruby/dump.h"11 #include "mruby/irep.h"12 #include "mruby/proc.h"13 #include "mruby/string.h"14 #include "mruby/debug.h"15 #include "mruby/error.h"10 #include <mruby/dump.h> 11 #include <mruby/irep.h> 12 #include <mruby/proc.h> 13 #include <mruby/string.h> 14 #include <mruby/debug.h> 15 #include <mruby/error.h> 16 16 17 17 #if SIZE_MAX < UINT32_MAX … … 524 524 if (bigendian_p()) 525 525 *flags |= FLAG_BYTEORDER_NATIVE; 526 else 526 else 527 527 *flags |= FLAG_BYTEORDER_BIG; 528 528 } … … 545 545 } 546 546 547 MRB_APImrb_irep*547 static mrb_irep* 548 548 read_irep(mrb_state *mrb, const uint8_t *bin, uint8_t flags) 549 549 { … … 603 603 } 604 604 605 MRB_APImrb_irep*605 mrb_irep* 606 606 mrb_read_irep(mrb_state *mrb, const uint8_t *bin) 607 607 { … … 615 615 } 616 616 617 void mrb_exc_set(mrb_state *mrb, mrb_value exc); 618 617 619 static void 618 620 irep_error(mrb_state *mrb) 619 621 { 620 mrb ->exc = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, E_SCRIPT_ERROR, "irep load error"));622 mrb_exc_set(mrb, mrb_exc_new_str_lit(mrb, E_SCRIPT_ERROR, "irep load error")); 621 623 } 622 624 … … 634 636 mrb_irep_decref(mrb, irep); 635 637 if (c && c->no_exec) return mrb_obj_value(proc); 636 return mrb_top level_run(mrb, proc);638 return mrb_top_run(mrb, proc, mrb_top_self(mrb), 0); 637 639 } 638 640 … … 645 647 #ifndef MRB_DISABLE_STDIO 646 648 647 MRB_APImrb_irep*649 mrb_irep* 648 650 mrb_read_irep_file(mrb_state *mrb, FILE* fp) 649 651 { … … 696 698 if (c && c->dump_result) mrb_codedump_all(mrb, proc); 697 699 if (c && c->no_exec) return mrb_obj_value(proc); 698 val = mrb_top level_run(mrb, proc);700 val = mrb_top_run(mrb, proc, mrb_top_self(mrb), 0); 699 701 return val; 700 702 }
Note:
See TracChangeset
for help on using the changeset viewer.