@@ -1818,7 +1818,6 @@ general_field_set(VALUE obj, shape_id_t target_shape_id, VALUE val, void *data,
1818
1818
struct gen_fields_lookup_ensure_size {
1819
1819
VALUE obj ;
1820
1820
ID id ;
1821
- struct gen_fields_tbl * fields_tbl ;
1822
1821
shape_id_t shape_id ;
1823
1822
bool resize ;
1824
1823
};
@@ -1829,11 +1828,11 @@ generic_ivar_set_shape_fields(VALUE obj, void *data)
1829
1828
RUBY_ASSERT (!rb_shape_obj_too_complex_p (obj ));
1830
1829
1831
1830
struct gen_fields_lookup_ensure_size * fields_lookup = data ;
1831
+ struct gen_fields_tbl * fields_tbl = NULL ;
1832
1832
1833
1833
// We can't use st_update, since when resizing the fields table GC can
1834
1834
// happen, which will modify the st_table and may rebuild it
1835
1835
RB_VM_LOCKING () {
1836
- struct gen_fields_tbl * fields_tbl = NULL ;
1837
1836
st_table * tbl = generic_fields_tbl (obj , fields_lookup -> id , false);
1838
1837
int existing = st_lookup (tbl , (st_data_t )obj , (st_data_t * )& fields_tbl );
1839
1838
@@ -1847,13 +1846,12 @@ generic_ivar_set_shape_fields(VALUE obj, void *data)
1847
1846
st_insert (tbl , (st_data_t )obj , (st_data_t )fields_tbl );
1848
1847
}
1849
1848
1850
- fields_lookup -> fields_tbl = fields_tbl ;
1851
1849
if (fields_lookup -> shape_id ) {
1852
1850
rb_obj_set_shape_id (fields_lookup -> obj , fields_lookup -> shape_id );
1853
1851
}
1854
1852
}
1855
1853
1856
- return fields_lookup -> fields_tbl -> as .shape .fields ;
1854
+ return fields_tbl -> as .shape .fields ;
1857
1855
}
1858
1856
1859
1857
static void
0 commit comments