summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorCremno <[email protected]>2013-03-23 16:55:56 +0100
committerCremno <[email protected]>2013-03-23 16:55:56 +0100
commitc09c098bc52e54f3e1a3c7701df45340776e112c (patch)
treea3d7ad1178773d6d31d373dd4942ccb949b74232 /include
parente69a13a20e0f145de644d1e229280713fe91cf6f (diff)
downloadmruby-c09c098bc52e54f3e1a3c7701df45340776e112c.tar.gz
mruby-c09c098bc52e54f3e1a3c7701df45340776e112c.zip
fixed NaN boxing compilation
Use MRB_SET_VALUE instead of directly accessing members of mrb_value which are different if NaN boxing is enabled.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/value.h9
1 files changed, 1 insertions, 8 deletions
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;
}