mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add API to define cfunc Proc with userdata.
The APIs are defined in mruby-proc-ext so include it before using this API. See mruby-proc-ext's test code for usage. This should resolve #1794.
This commit is contained in:
@@ -55,6 +55,10 @@ void mrb_proc_copy(struct RProc *a, struct RProc *b);
|
||||
/* implementation of #send method */
|
||||
mrb_value mrb_f_send(mrb_state *mrb, mrb_value self);
|
||||
|
||||
/* following functions are defined in mruby-proc-ext so please include it when using */
|
||||
struct RProc *mrb_proc_new_cfunc_with_env(mrb_state*, mrb_func_t, mrb_int, const mrb_value*);
|
||||
mrb_value mrb_cfunc_env_get(mrb_state*, mrb_int);
|
||||
|
||||
#include "mruby/khash.h"
|
||||
KHASH_DECLARE(mt, mrb_sym, struct RProc*, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user