Skip to content

Commit 92688f7

Browse files
committed
variable.c: refactor accesses to the generic_fields_tbl
All accesses to `generic_fields_tbl_` are now encapsulated inside: - `rb_obj_fields` - `rb_obj_set_fields` - `rb_obj_replace_fields`
1 parent e60e195 commit 92688f7

File tree

5 files changed

+116
-173
lines changed

5 files changed

+116
-173
lines changed

internal/variable.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ void rb_gvar_namespace_ready(const char *name);
4646
*/
4747
VALUE rb_mod_set_temporary_name(VALUE, VALUE);
4848

49-
int rb_gen_fields_tbl_get(VALUE obj, ID id, VALUE *fields_obj);
5049
void rb_obj_copy_ivs_to_hash_table(VALUE obj, st_table *table);
5150
void rb_obj_init_too_complex(VALUE obj, st_table *table);
5251
void rb_evict_ivars_to_hash(VALUE obj);

ractor.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,8 +1679,7 @@ obj_traverse_replace_i(VALUE obj, struct obj_traverse_replace_data *data)
16791679
} while (0)
16801680

16811681
if (UNLIKELY(rb_obj_exivar_p(obj))) {
1682-
VALUE fields_obj;
1683-
rb_ivar_generic_fields_tbl_lookup(obj, &fields_obj);
1682+
VALUE fields_obj = rb_obj_fields_no_ractor_check(obj);
16841683

16851684
if (UNLIKELY(rb_shape_obj_too_complex_p(obj))) {
16861685
struct obj_traverse_replace_callback_data d = {

0 commit comments

Comments
 (0)