From c09c098bc52e54f3e1a3c7701df45340776e112c Mon Sep 17 00:00:00 2001 From: Cremno Date: Sat, 23 Mar 2013 16:55:56 +0100 Subject: fixed NaN boxing compilation Use MRB_SET_VALUE instead of directly accessing members of mrb_value which are different if NaN boxing is enabled. --- include/mruby/value.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'include') diff --git a/include/mruby/value.h b/include/mruby/value.h index 5730bf909..53e30efe7 100644 --- a/include/mruby/value.h +++ b/include/mruby/value.h @@ -280,14 +280,7 @@ mrb_bool_value(mrb_bool boolean) { mrb_value v; - v.value.i = 1; - if (boolean) { - v.tt = MRB_TT_TRUE; - } - else { - v.tt = MRB_TT_FALSE; - } - + MRB_SET_VALUE(v, boolean ? MRB_TT_TRUE : MRB_TT_FALSE, value.i, 1); return v; } -- cgit v1.2.3