summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-13 12:17:42 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-13 12:17:42 (GMT)
commitccc5c7325850e9306ce45484892ded796603be4c (patch)
tree359418cf57eb203a7b34bc002deb39d3e73ba781 /variable.c
parent2768bae806cd502a76d02b76b09f546296a10aa8 (diff)
variable.c (struct gen_ivtbl): Use FLEX_ARY_LEN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c
index 51891e2..8366863 100644
--- a/variable.c
+++ b/variable.c
@@ -34,7 +34,7 @@ static st_table *generic_iv_tbl_compat;
/* per-object */
struct gen_ivtbl {
uint32_t numiv;
- VALUE ivptr[1]; /* flexible array */
+ VALUE ivptr[FLEX_ARY_LEN];
};
struct ivar_update {
@@ -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) - sizeof(VALUE);
+ return sizeof(struct gen_ivtbl) + n * sizeof(VALUE);
}
static struct gen_ivtbl *