mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove duplicate code
These functions are the same, so remove one. Co-authored-by: John Hawthorn <john@hawthorn.email>
This commit is contained in:
parent
e58814d150
commit
d0d743ad45
3 changed files with 2 additions and 9 deletions
6
gc.c
6
gc.c
|
@ -7995,12 +7995,6 @@ gc_ref_update_hash(rb_objspace_t * objspace, VALUE v)
|
|||
rb_hash_stlike_foreach_with_replace(v, hash_foreach_replace, hash_replace_ref, (st_data_t)objspace);
|
||||
}
|
||||
|
||||
void rb_update_st_references(struct st_table *ht)
|
||||
{
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
gc_update_table_refs(objspace, ht);
|
||||
}
|
||||
|
||||
static void
|
||||
gc_ref_update_method_entry(rb_objspace_t *objspace, rb_method_entry_t *me)
|
||||
{
|
||||
|
|
|
@ -532,10 +532,9 @@ PUREFUNC(int rb_during_gc(void));
|
|||
void rb_gc_mark_locations(const VALUE*, const VALUE*);
|
||||
void rb_mark_tbl(struct st_table*);
|
||||
void rb_mark_tbl_no_pin(struct st_table*);
|
||||
void rb_gc_update_tbl_refs(st_table *ptr);
|
||||
void rb_mark_set(struct st_table*);
|
||||
void rb_mark_hash(struct st_table*);
|
||||
void rb_update_st_references(struct st_table *ht);
|
||||
void rb_gc_update_tbl_refs(st_table *ptr);
|
||||
void rb_gc_mark_maybe(VALUE);
|
||||
void rb_gc_mark(VALUE);
|
||||
void rb_gc_mark_movable(VALUE);
|
||||
|
|
2
vm.c
2
vm.c
|
@ -2220,7 +2220,7 @@ rb_vm_update_references(void *ptr)
|
|||
{
|
||||
if (ptr) {
|
||||
rb_vm_t *vm = ptr;
|
||||
rb_update_st_references(vm->frozen_strings);
|
||||
rb_gc_update_tbl_refs(vm->frozen_strings);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue