1
0
Fork 0
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:
Aaron Patterson 2019-11-06 16:29:09 -08:00
parent e58814d150
commit d0d743ad45
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6
3 changed files with 2 additions and 9 deletions

6
gc.c
View file

@ -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)
{

View file

@ -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
View file

@ -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);
}
}