mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Reorganize flags values for classes; fix #3975
Renamed flag macro names as well: `MRB_FLAG_IS_FROZEN` -> `MRB_FL_OBJ_FROZEN` `MRB_FLAG_IS_PREPENDED` -> `MRB_FL_CLASS_IS_PREPENDED` `MRB_FLAG_IS_ORIGIN` -> `MRB_FL_CLASS_IS_ORIGIN` `MRB_FLAG_IS_INHERITED` -> `MRB_FL_CLASS_IS_INHERITED`
This commit is contained in:
@@ -22,11 +22,10 @@ struct RBasic {
|
||||
};
|
||||
#define mrb_basic_ptr(v) ((struct RBasic*)(mrb_ptr(v)))
|
||||
|
||||
/* flags bits >= 18 is reserved */
|
||||
#define MRB_FLAG_IS_FROZEN (1 << 18)
|
||||
#define MRB_FROZEN_P(o) ((o)->flags & MRB_FLAG_IS_FROZEN)
|
||||
#define MRB_SET_FROZEN_FLAG(o) ((o)->flags |= MRB_FLAG_IS_FROZEN)
|
||||
#define MRB_UNSET_FROZEN_FLAG(o) ((o)->flags &= ~MRB_FLAG_IS_FROZEN)
|
||||
#define MRB_FL_OBJ_IS_FROZEN (1 << 20)
|
||||
#define MRB_FROZEN_P(o) ((o)->flags & MRB_FL_OBJ_IS_FROZEN)
|
||||
#define MRB_SET_FROZEN_FLAG(o) ((o)->flags |= MRB_FL_OBJ_IS_FROZEN)
|
||||
#define MRB_UNSET_FROZEN_FLAG(o) ((o)->flags &= ~MRB_FL_OBJ_IS_FROZEN)
|
||||
|
||||
struct RObject {
|
||||
MRB_OBJECT_HEADER;
|
||||
|
||||
Reference in New Issue
Block a user