From d75a907edf761b823d83aa658025de52508b8966 Mon Sep 17 00:00:00 2001 From: fleuria Date: Sun, 3 Nov 2013 11:32:59 +0800 Subject: introduce mrb_context_run() currently there are two scnenario to call mrb_run(), the first is calling a proc, in this case mrb should create a new environment, discarding all the variables except args, reciever and block. the second is calling the newly generated irep, like in mirb. in this case, the variables should be kept after mrb_run(). so we introduce mrb_context_run() to handle this seperately. --- include/mruby.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mruby.h b/include/mruby.h index b3dc59a08..a374bf429 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -261,6 +261,7 @@ void mrb_close(mrb_state*); mrb_value mrb_top_self(mrb_state *); mrb_value mrb_run(mrb_state*, struct RProc*, mrb_value); +mrb_value mrb_context_run(mrb_state*, struct RProc*, mrb_value); void mrb_p(mrb_state*, mrb_value); mrb_int mrb_obj_id(mrb_value obj); -- cgit v1.2.3