From 54c5b12fb7bc5fdd57326780e970ee467387f81a Mon Sep 17 00:00:00 2001 From: Miura Hideki Date: Sun, 17 Nov 2013 16:33:39 +0900 Subject: irep->pool struct pool -> mrb_value --- src/state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index 9ec96068e..c8f3c48f8 100644 --- a/src/state.c +++ b/src/state.c @@ -11,6 +11,7 @@ #include "mruby/irep.h" #include "mruby/variable.h" #include "mruby/debug.h" +#include "mruby/string.h" void mrb_init_heap(mrb_state*); void mrb_init_core(mrb_state*); @@ -129,8 +130,8 @@ mrb_irep_free(mrb_state *mrb, mrb_irep *irep) if (!(irep->flags & MRB_ISEQ_NO_FREE)) mrb_free(mrb, irep->iseq); for (i=0; iplen; i++) { - if (irep->pool[i].type == IREP_TT_STRING) - mrb_free(mrb, irep->pool[i].value.s); + if (mrb_type(irep->pool[i]) == MRB_TT_STRING) + mrb_free(mrb, mrb_obj_ptr(irep->pool[i])); } mrb_free(mrb, irep->pool); mrb_free(mrb, irep->syms); -- cgit v1.2.3