diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-18 10:07:26 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-18 10:07:26 +0900 |
| commit | 3d8350f9202576a18695d877afa1e88986df513f (patch) | |
| tree | 63e47689cf6599f15216091d26d30d90ab2275d8 | |
| parent | 7c80edb577722a140b805f55f9c51a23f78da992 (diff) | |
| download | mruby-3d8350f9202576a18695d877afa1e88986df513f.tar.gz mruby-3d8350f9202576a18695d877afa1e88986df513f.zip | |
Retrieve `irep` from `proc` after `MRB_PROC_CFUNC_P` check; ref #5140
| -rw-r--r-- | mrbgems/mruby-proc-ext/src/proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c index 2f4f77de7..cb748651d 100644 --- a/mrbgems/mruby-proc-ext/src/proc.c +++ b/mrbgems/mruby-proc-ext/src/proc.c @@ -104,7 +104,7 @@ mrb_proc_parameters(mrb_state *mrb, mrb_value self) {0, 0} }; const struct RProc *proc = mrb_proc_ptr(self); - const struct mrb_irep *irep = proc->body.irep; + const struct mrb_irep *irep; mrb_aspec aspec; mrb_value parameters; mrb_value krest = mrb_nil_value(); @@ -116,6 +116,7 @@ mrb_proc_parameters(mrb_state *mrb, mrb_value self) // TODO cfunc aspec is not implemented yet return mrb_ary_new(mrb); } + irep = proc->body.irep; if (!irep) { return mrb_ary_new(mrb); } |
