Fixes for compiling mruby as C++

This commit is contained in:
Tomasz Dąbrowski
2016-11-22 13:19:05 +01:00
committed by Yukihiro "Matz" Matsumoto
parent 477e12c182
commit 1af9e363f2
7 changed files with 30 additions and 14 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ typedef struct mrb_value {
#define mrb_float_pool(mrb,f) mrb_float_value(mrb,f)
#define mrb_tt(o) ((enum mrb_vtype)(((o).value.ttt & 0xfc000)>>14)-1)
#define mrb_type(o) ((uint32_t)0xfff00000 < (o).value.ttt ? mrb_tt(o) : MRB_TT_FLOAT)
#define mrb_type(o) (enum mrb_vtype)((uint32_t)0xfff00000 < (o).value.ttt ? mrb_tt(o) : MRB_TT_FLOAT)
#define mrb_ptr(o) ((void*)((((uintptr_t)0x3fffffffffff)&((uintptr_t)((o).value.p)))<<2))
#define mrb_float(o) (o).f
#define mrb_cptr(o) mrb_ptr(o)