summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-14 11:19:18 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-14 11:19:18 (GMT)
commit6b5e0bd98c3a807ab7708e775ac9b60a4f59e427 (patch)
tree5e86e7f6ac8258b53aaef567a416e7caac4fdd66 /variable.c
parentbbea0270272720d6b97fa74cf59d20eee9519aa8 (diff)
exclude flexible array size with old compilers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 8366863..1923f28 100644
--- a/variable.c
+++ b/variable.c
@@ -1001,7 +1001,7 @@ generic_ivar_get(VALUE obj, ID id, VALUE undef)
static size_t
gen_ivtbl_bytes(size_t n)
{
- return sizeof(struct gen_ivtbl) + n * sizeof(VALUE);
+ return offsetof(struct gen_ivtbl, ivptr) + n * sizeof(VALUE);
}
static struct gen_ivtbl *