summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hash.c1
-rw-r--r--internal.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index b0e9b027fd..53fe79bfc0 100644
--- a/hash.c
+++ b/hash.c
@@ -1317,7 +1317,6 @@ iter_lev_in_ivar_set(VALUE hash, int lev)
rb_ivar_set_internal(hash, rb_intern("hash_iter_lev"), INT2FIX(lev));
}
-#define RHASH_LEV_MASK ((VALUE)RHASH_LEV_MAX << RHASH_LEV_SHIFT)
static int
iter_lev_in_flags(VALUE hash)
{
diff --git a/internal.h b/internal.h
index 1dbb3d3862..832428bd03 100644
--- a/internal.h
+++ b/internal.h
@@ -823,6 +823,10 @@ enum ruby_rhash_flags {
RHASH_AR_TABLE_BOUND_MASK = (FL_USER8|FL_USER9|FL_USER10|FL_USER11), /* FL 8..11 */
RHASH_AR_TABLE_BOUND_SHIFT = (FL_USHIFT+8),
+ // we can not put it in "enum" because it can exceed "int" range.
+#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ \
+ FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
+
#if USE_TRANSIENT_HEAP
RHASH_TRANSIENT_FLAG = FL_USER12, /* FL 12 */
#endif