aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ruby.h b/ruby.h
index 4244cd4ee4..ca4cf27d3c 100644
--- a/ruby.h
+++ b/ruby.h
@@ -428,11 +428,12 @@ struct RStruct {
VALUE ary[RSTRUCT_EMBED_LEN_MAX];
} as;
};
-#define RSTRUCT_EMBED_LEN_MASK (FL_USER1|FL_USER0)
-#define RSTRUCT_EMBED_LEN_SHIFT FL_USHIFT
+#define RSTRUCT_EMBED_LEN_MASK (FL_USER2|FL_USER1)
+#define RSTRUCT_EMBED_LEN_SHIFT FL_USHIFT+1
#define RSTRUCT_LEN(st) \
((RBASIC(st)->flags & RSTRUCT_EMBED_LEN_MASK) ? \
- (RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & 3 : \
+ (RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & \
+ (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT) : \
RSTRUCT(st)->as.heap.len)
#define RSTRUCT_PTR(st) \
((RBASIC(st)->flags & RSTRUCT_EMBED_LEN_MASK) ? \