summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-20 14:12:51 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-30 10:26:38 +0900
commitcf336082039ae84b5001908f6bb7e04bdda8893e (patch)
tree4a89c410a24a8bfd946deee2c1358734c6fd3357 /gc.c
parent3632a812c0b1e0bd1c75b2426cbfe9ec1715bb56 (diff)
refactor constify most of rb_method_definition_t
Most (if not all) of the fields of rb_method_definition_t are never meant to be modified once after they are stored. Marking them const makes it possible for compilers to warn on unintended modifications.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2486
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index c9f26cc174..0caee4c260 100644
--- a/gc.c
+++ b/gc.c
@@ -7831,7 +7831,7 @@ void rb_update_st_references(struct st_table *ht)
static void
gc_ref_update_method_entry(rb_objspace_t *objspace, rb_method_entry_t *me)
{
- rb_method_definition_t *def = me->def;
+ const rb_method_definition_t *def = me->def;
UPDATE_IF_MOVED(objspace, me->owner);
UPDATE_IF_MOVED(objspace, me->defined_class);