proc.c: add mrb_state argument to mrb_proc_copy().

The function may invoke the garbage collection and it requires
`mrb_state` to run.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-12-14 13:35:18 +09:00
parent 8a74b2a25d
commit f5e10c5a79
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ struct RProc *mrb_proc_new(mrb_state*, const mrb_irep*);
struct RProc *mrb_closure_new(mrb_state*, const mrb_irep*);
MRB_API struct RProc *mrb_proc_new_cfunc(mrb_state*, mrb_func_t);
MRB_API struct RProc *mrb_closure_new_cfunc(mrb_state *mrb, mrb_func_t func, int nlocals);
void mrb_proc_copy(struct RProc *a, struct RProc *b);
void mrb_proc_copy(mrb_state *mrb, struct RProc *a, struct RProc *b);
mrb_int mrb_proc_arity(const struct RProc *p);
/* following functions are defined in mruby-proc-ext so please include it when using */