refactor mruby method(fix indent. remove temporary value, duplicate procedure)

This commit is contained in:
kkkkkt
2014-08-18 10:58:48 +09:00
parent 98a95530c2
commit 9da37cdfd1
5 changed files with 9 additions and 18 deletions
+2 -4
View File
@@ -337,7 +337,7 @@ read_debug_record(mrb_state *mrb, const uint8_t *start, mrb_irep* irep, size_t *
size_t len;
int ret;
ret =read_debug_record(mrb, bin, irep->reps[i], &len, filenames, filenames_len);
ret = read_debug_record(mrb, bin, irep->reps[i], &len, filenames, filenames_len);
if (ret != MRB_DUMP_OK) return ret;
bin += len;
}
@@ -570,7 +570,6 @@ MRB_API mrb_value
mrb_load_irep_cxt(mrb_state *mrb, const uint8_t *bin, mrbc_context *c)
{
mrb_irep *irep = mrb_read_irep(mrb, bin);
mrb_value val;
struct RProc *proc;
if (!irep) {
@@ -580,8 +579,7 @@ mrb_load_irep_cxt(mrb_state *mrb, const uint8_t *bin, mrbc_context *c)
proc = mrb_proc_new(mrb, irep);
mrb_irep_decref(mrb, irep);
if (c && c->no_exec) return mrb_obj_value(proc);
val = mrb_toplevel_run(mrb, proc);
return val;
return mrb_toplevel_run(mrb, proc);
}
MRB_API mrb_value