Refactor #4662 with different names.

parent 49967097
......@@ -10,7 +10,7 @@
#define MRB_FIXNUM_SHIFT 0
#define MRB_TT_HAS_BASIC MRB_TT_OBJECT
union mrb_value_value {
union mrb_value_union {
#ifndef MRB_WITHOUT_FLOAT
mrb_float f;
#endif
......@@ -20,7 +20,7 @@ union mrb_value_value {
};
typedef struct mrb_value {
union mrb_value_value value;
union mrb_value_union value;
enum mrb_vtype tt;
} mrb_value;
......
......@@ -44,21 +44,21 @@ struct RBreak {
struct RBreak {
MRB_OBJECT_HEADER;
struct RProc *proc;
union mrb_value_value val_val;
union mrb_value_union value;
};
#define RBREAK_VALUE_TT_MASK ((1 << 8) - 1)
static inline mrb_value
mrb_break_value_get(struct RBreak *brk)
{
mrb_value val;
val.value = brk->val_val;
val.value = brk->value;
val.tt = brk->flags & RBREAK_VALUE_TT_MASK;
return val;
}
static inline void
mrb_break_value_set(struct RBreak *brk, mrb_value val)
{
brk->val_val = val.value;
brk->val_union = val.value;
brk->flags &= ~RBREAK_VALUE_TT_MASK;
brk->flags |= val.tt;
}
......
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