mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
use intptr_t instead of int64_t for 32bit platforms
This commit is contained in:
@@ -155,7 +155,7 @@ typedef struct mrb_value {
|
||||
#define mrb_tt(o) (((o).value.ttt & 0xfc000)>>14)
|
||||
#define mrb_mktt(tt) (0xfff00000|((tt)<<14))
|
||||
#define mrb_type(o) ((uint32_t)0xfff00000 < (o).value.ttt ? mrb_tt(o) : MRB_TT_FLOAT)
|
||||
#define mrb_ptr(o) ((void*)((((uint64_t)0x3fffffffffff)&((uint64_t)((o).value.p)))<<2))
|
||||
#define mrb_ptr(o) ((void*)((((intptr_t)0x3fffffffffff)&((intptr_t)((o).value.p)))<<2))
|
||||
#define mrb_float(o) (o).f
|
||||
|
||||
#define MRB_SET_VALUE(o, tt, attr, v) do {\
|
||||
@@ -166,7 +166,7 @@ typedef struct mrb_value {
|
||||
case MRB_TT_UNDEF:\
|
||||
case MRB_TT_FIXNUM:\
|
||||
case MRB_TT_SYMBOL: (o).attr = (v); break;\
|
||||
default: (o).value.i = 0; (o).value.p = (void*)((uint64_t)(o).value.p | (((uint64_t)(v))>>2)); break;\
|
||||
default: (o).value.i = 0; (o).value.p = (void*)((intptr_t)(o).value.p | (((intptr_t)(v))>>2)); break;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user