diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-07-31 11:08:05 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-07-31 11:08:05 +0900 |
commit | 13e84d5c0a53ad013aa0093f179115bcf88417e9 () | |
tree | 936bc22c4cd56e0c60106761686020ff01ff962b | |
parent | e315f3a1341f123051b75e589b746132c3510079 (diff) |
Moved RHASH_LEV_MASK and turned into a macro
Get rid of "ISO C restricts enumerator values to range of 'int'" error.
-rw-r--r-- | hash.c | 3 | ||||
-rw-r--r-- | internal.h | 2 |
2 files changed, 2 insertions, 3 deletions
@@ -1317,10 +1317,11 @@ iter_lev_in_ivar_set(VALUE hash, int lev) rb_ivar_set_internal(hash, rb_intern("hash_iter_lev"), INT2FIX(lev)); } static int iter_lev_in_flags(VALUE hash) { - unsigned int u = (unsigned int)(RBASIC(hash)->flags & (unsigned int)RHASH_LEV_MASK) >> RHASH_LEV_SHIFT; return (int)u; } @@ -827,8 +827,6 @@ enum ruby_rhash_flags { RHASH_TRANSIENT_FLAG = FL_USER12, /* FL 12 */ #endif - RHASH_LEV_MASK = (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ - FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19), RHASH_LEV_SHIFT = (FL_USHIFT + 13), RHASH_LEV_MAX = 127, /* 7 bits */ |