summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 10:21:31 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 10:21:31 +0000
commit2ab99609e0968200c5b6ef41a1d3894c94d2d267 (patch)
tree784f06d98f184812a7299ad6c4ec52c988a0616b /internal.h
parent49ce3ca3742e09c3ce1e5e9a12d9e30a504d711e (diff)
imemo_mask (enum) -> IMEMO_MASK (immediate value).
* internal.h: imemo_mask is not a valid imemo type but switch statements show warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal.h b/internal.h
index 10c58d6533..83b61f4d01 100644
--- a/internal.h
+++ b/internal.h
@@ -844,14 +844,14 @@ enum imemo_type {
imemo_memo = 5,
imemo_ment = 6,
imemo_iseq = 7,
- imemo_alloc = 8,
- imemo_mask = 0x0f
+ imemo_alloc = 8
};
+#define IMEMO_MASK 0x0f
static inline enum imemo_type
imemo_type(VALUE imemo)
{
- return (RBASIC(imemo)->flags >> FL_USHIFT) & imemo_mask;
+ return (RBASIC(imemo)->flags >> FL_USHIFT) & IMEMO_MASK;
}
static inline int
@@ -859,7 +859,7 @@ imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
{
if (LIKELY(!RB_SPECIAL_CONST_P(imemo))) {
/* fixed at compile time if imemo_type is given. */
- const VALUE mask = (imemo_mask << FL_USHIFT) | RUBY_T_MASK;
+ const VALUE mask = (IMEMO_MASK << FL_USHIFT) | RUBY_T_MASK;
const VALUE expected_type = (imemo_type << FL_USHIFT) | T_IMEMO;
/* fixed at runtime. */
return expected_type == (RBASIC(imemo)->flags & mask);