From b38eb72d829edc94c6a9f5d34bb6e5c102039cb5 Mon Sep 17 00:00:00 2001 From: take_cheeze Date: Tue, 1 Apr 2014 01:35:40 +0900 Subject: Add macro MRB_ENV_UNSHARE_STACK instead of assigning -1 directly. --- mrbgems/mruby-proc-ext/src/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-proc-ext') diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c index b4744fa1b..8b6ee4740 100644 --- a/mrbgems/mruby-proc-ext/src/proc.c +++ b/mrbgems/mruby-proc-ext/src/proc.c @@ -17,7 +17,7 @@ mrb_proc_new_cfunc_with_env(mrb_state *mrb, mrb_func_t f, mrb_int argc, const mr p->env = e; mrb_gc_arena_restore(mrb, ai); - e->cioff = -1; + MRB_ENV_UNSHARE_STACK(e); MRB_ENV_STACK_LEN(e) = argc; e->stack = (mrb_value*)mrb_malloc(mrb, sizeof(mrb_value) * argc); for (i = 0; i < argc; ++i) { -- cgit v1.2.3