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.
This commit is contained in:
Peter Zhu 2025-05-30 10:40:58 -04:00
parent cfe17520ba
commit acc273a8a4
Notes: git 2025-06-02 13:52:41 +00:00

View File

@ -28,7 +28,6 @@
#include "ruby/util.h"
#include "ruby/vm.h"
#include "ruby/internal/encoding/string.h"
#include "internal/object.h"
#include "ccan/list/list.h"
#include "darray.h"
#include "gc/gc.h"
@ -2972,7 +2971,7 @@ rb_gc_impl_shutdown_free_objects(void *objspace_ptr)
if (RB_BUILTIN_TYPE(vp) != T_NONE) {
rb_gc_obj_free_vm_weak_references(vp);
if (rb_gc_obj_free(objspace, vp)) {
RBASIC_RESET_FLAGS(vp);
RBASIC(vp)->flags = 0;
}
}
}
@ -3046,7 +3045,7 @@ rb_gc_impl_shutdown_call_finalizer(void *objspace_ptr)
if (rb_gc_shutdown_call_finalizer_p(vp)) {
rb_gc_obj_free_vm_weak_references(vp);
if (rb_gc_obj_free(objspace, vp)) {
RBASIC_RESET_FLAGS(vp);
RBASIC(vp)->flags = 0;
}
}
}