summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-03-31 09:50:28 +0900
committertake_cheeze <[email protected]>2014-03-31 10:01:17 +0900
commitbf6b1dfe216976f1adb7f41a74f20339fedcbec8 (patch)
tree15901b85b1c8a4b242384e0a12a4c9a42a5c1385 /include
parent3eb3c99a6a5aa0fdcfe6127248e8e16b42c35d05 (diff)
downloadmruby-bf6b1dfe216976f1adb7f41a74f20339fedcbec8.tar.gz
mruby-bf6b1dfe216976f1adb7f41a74f20339fedcbec8.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/proc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mruby/proc.h b/include/mruby/proc.h
index 474cf0142..bb924447e 100644
--- a/include/mruby/proc.h
+++ b/include/mruby/proc.h
@@ -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)