summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-26 10:22:01 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-30 10:26:38 +0900
commitdd883de5ba311c38818d0f638a94b4fbc63f5ee5 (patch)
treed430c06f19a7dcafdc35558f7720d48308dfd435 /gc.c
parent6c6a25feca8752205d81c5247f85d8ae8fb880d8 (diff)
refactor constify most of rb_method_entry_t
Now that we have eliminated most destructive operations over the rb_method_entry_t / rb_callable_method_entry_t, let's make them mostly immutabe and mark them const. One exception is rb_export_method(), which destructively modifies visibilities of method entries. I have left that operation as is because I suspect that destructiveness is the nature of that function.
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 0caee4c260..52b3a66b6c 100644
--- a/gc.c
+++ b/gc.c
@@ -7829,7 +7829,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)
+gc_ref_update_method_entry(rb_objspace_t *objspace, const rb_method_entry_t *me)
{
const rb_method_definition_t *def = me->def;