Commit 1de662cb authored by dearblue's avatar dearblue

Fix failed build with `MRB_NAN_BOXING` and `enable_cxx_abi`

```console
% c++ -xc++ -std=c++03 -S -Iinclude -DMRB_NAN_BOXING -DMRB_NO_PRESYM -o- src/array.c > /dev/null
In file included from src/array.c:7:
In file included from include/mruby.h:115:
In file included from include/mruby/value.h:201:
include/mruby/boxing_nan.h:95:12: error: cannot initialize return object of type 'enum mrb_vtype' with an rvalue of type 'int'
    return (enum mrb_vtype)(o.u >> 8) & 0x1f;
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
parent d8204d51
...@@ -92,7 +92,7 @@ mrb_type(mrb_value o) ...@@ -92,7 +92,7 @@ mrb_type(mrb_value o)
case MRB_NANBOX_TT_SYMBOL: case MRB_NANBOX_TT_SYMBOL:
return MRB_TT_SYMBOL; return MRB_TT_SYMBOL;
case MRB_NANBOX_TT_MISC: case MRB_NANBOX_TT_MISC:
return (enum mrb_vtype)(o.u >> 8) & 0x1f; return (enum mrb_vtype)((o.u >> 8) & 0x1f);
default: default:
/* never happen */ /* never happen */
return MRB_TT_FLOAT; return MRB_TT_FLOAT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment