mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Evaluate macros argument just once
This commit is contained in:
parent
7cb8904a12
commit
74ac12830b
1 changed files with 3 additions and 3 deletions
6
method.h
6
method.h
|
@ -70,11 +70,11 @@ typedef struct rb_callable_method_entry_struct { /* same fields with rb_method_e
|
|||
#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
|
||||
#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
|
||||
#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
|
||||
#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER3)
|
||||
#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3)
|
||||
#define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4)
|
||||
#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER4)
|
||||
#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4)
|
||||
#define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5)
|
||||
#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER5)
|
||||
#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5)
|
||||
|
||||
static inline void
|
||||
METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
|
||||
|
|
Loading…
Reference in a new issue