Skip to content

Commit acc273a

Browse files
committed
Remove dependancy of default.c on internal/object.h
We don't want the default GC to depend on Ruby internals so we can build it as a modular GC.
1 parent cfe1752 commit acc273a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gc/default/default.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "ruby/util.h"
2929
#include "ruby/vm.h"
3030
#include "ruby/internal/encoding/string.h"
31-
#include "internal/object.h"
3231
#include "ccan/list/list.h"
3332
#include "darray.h"
3433
#include "gc/gc.h"
@@ -2972,7 +2971,7 @@ rb_gc_impl_shutdown_free_objects(void *objspace_ptr)
29722971
if (RB_BUILTIN_TYPE(vp) != T_NONE) {
29732972
rb_gc_obj_free_vm_weak_references(vp);
29742973
if (rb_gc_obj_free(objspace, vp)) {
2975-
RBASIC_RESET_FLAGS(vp);
2974+
RBASIC(vp)->flags = 0;
29762975
}
29772976
}
29782977
}
@@ -3046,7 +3045,7 @@ rb_gc_impl_shutdown_call_finalizer(void *objspace_ptr)
30463045
if (rb_gc_shutdown_call_finalizer_p(vp)) {
30473046
rb_gc_obj_free_vm_weak_references(vp);
30483047
if (rb_gc_obj_free(objspace, vp)) {
3049-
RBASIC_RESET_FLAGS(vp);
3048+
RBASIC(vp)->flags = 0;
30503049
}
30513050
}
30523051
}

0 commit comments

Comments
 (0)