rename rb_gc_obj_free_on_sweep -> rb_gc_obj_needs_cleanup_p

This commit is contained in:
Matt Valentine-House 2026-01-23 16:45:57 +00:00
parent 8e73aa7ffe
commit 7444f415db
Notes: git 2026-01-26 18:01:52 +00:00
3 changed files with 3 additions and 3 deletions

2
gc.c
View File

@ -1257,7 +1257,7 @@ rb_gc_handle_weak_references(VALUE obj)
* for the majority of simple objects.
*/
bool
rb_gc_obj_free_on_sweep_p(VALUE obj)
rb_gc_obj_needs_cleanup_p(VALUE obj)
{
VALUE flags = RBASIC(obj)->flags;

View File

@ -3521,7 +3521,7 @@ gc_sweep_plane(rb_objspace_t *objspace, rb_heap_t *heap, uintptr_t p, bits_t bit
#undef CHECK
#endif
if (!rb_gc_obj_free_on_sweep_p(vp)) {
if (!rb_gc_obj_needs_cleanup_p(vp)) {
if (RB_UNLIKELY(objspace->hook_events & RUBY_INTERNAL_EVENT_FREEOBJ)) {
rb_gc_event_hook(vp, RUBY_INTERNAL_EVENT_FREEOBJ);
}

View File

@ -100,7 +100,7 @@ MODULAR_GC_FN void rb_gc_after_updating_jit_code(void);
MODULAR_GC_FN bool rb_gc_obj_shareable_p(VALUE);
MODULAR_GC_FN void rb_gc_rp(VALUE);
MODULAR_GC_FN void rb_gc_handle_weak_references(VALUE obj);
MODULAR_GC_FN bool rb_gc_obj_free_on_sweep_p(VALUE obj);
MODULAR_GC_FN bool rb_gc_obj_needs_cleanup_p(VALUE obj);
#if USE_MODULAR_GC
MODULAR_GC_FN bool rb_gc_event_hook_required_p(rb_event_flag_t event);