@@ -2777,27 +2777,15 @@ static const rb_data_type_t autoload_data_type = {
27772777};
27782778
27792779static void
2780- autoload_const_compact (void * ptr )
2780+ autoload_const_mark_and_move (void * ptr )
27812781{
27822782 struct autoload_const * ac = ptr ;
27832783
2784- ac -> module = rb_gc_location (ac -> module );
2785- ac -> autoload_data_value = rb_gc_location (ac -> autoload_data_value );
2786- ac -> value = rb_gc_location (ac -> value );
2787- ac -> file = rb_gc_location (ac -> file );
2788- ac -> namespace = rb_gc_location (ac -> namespace );
2789- }
2790-
2791- static void
2792- autoload_const_mark (void * ptr )
2793- {
2794- struct autoload_const * ac = ptr ;
2795-
2796- rb_gc_mark_movable (ac -> module );
2797- rb_gc_mark_movable (ac -> autoload_data_value );
2798- rb_gc_mark_movable (ac -> value );
2799- rb_gc_mark_movable (ac -> file );
2800- rb_gc_mark_movable (ac -> namespace );
2784+ rb_gc_mark_and_move (& ac -> module );
2785+ rb_gc_mark_and_move (& ac -> autoload_data_value );
2786+ rb_gc_mark_and_move (& ac -> value );
2787+ rb_gc_mark_and_move (& ac -> file );
2788+ rb_gc_mark_and_move (& ac -> namespace );
28012789}
28022790
28032791static size_t
@@ -2817,7 +2805,7 @@ autoload_const_free(void *ptr)
28172805
28182806static const rb_data_type_t autoload_const_type = {
28192807 "autoload_const" ,
2820- {autoload_const_mark , autoload_const_free , autoload_const_memsize , autoload_const_compact ,},
2808+ {autoload_const_mark_and_move , autoload_const_free , autoload_const_memsize , autoload_const_mark_and_move ,},
28212809 0 , 0 , RUBY_TYPED_FREE_IMMEDIATELY
28222810};
28232811
0 commit comments