summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-07-22 17:01:31 +0900
committerKoichi Sasada <ko1@atdot.net>2019-07-22 17:01:31 +0900
commitf75561b8d455e1cf92dac8ac8838fdafc88cba71 (patch)
treeb6d9155bf14448da923699250ca3e9d7c664293b /internal.h
parentd1c2b1969814fee14a01296aa2867abd07f70d04 (diff)
constify RHash::ifnone.
RHash::ifnone should be protected by write-barriers so this field should be const. However, to introduce GC.compact, the const was removed. This commit revert this removing `const` and modify gc.c `TYPED_UPDATE_IF_MOVED` to remove `const` forcely by a type cast.
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal.h b/internal.h
index b931c115df..f8baba48c1 100644
--- a/internal.h
+++ b/internal.h
@@ -873,7 +873,7 @@ struct RHash {
struct ar_table_struct *ar; /* possibly 0 */
} as;
int iter_lev;
- VALUE ifnone;
+ const VALUE ifnone;
};
#ifdef RHASH_ITER_LEV