mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
rename rb_gc_obj_free_on_sweep -> rb_gc_obj_needs_cleanup_p
This commit is contained in:
parent
8e73aa7ffe
commit
7444f415db
Notes:
git
2026-01-26 18:01:52 +00:00
2
gc.c
2
gc.c
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
2
gc/gc.h
2
gc/gc.h
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user