fixed NaN boxing compilation

Use MRB_SET_VALUE instead of directly accessing members of mrb_value
which are different if NaN boxing is enabled.
This commit is contained in:
Cremno
2013-03-23 16:55:56 +01:00
parent e69a13a20e
commit c09c098bc5
+1 -8
View File
@@ -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;
}