From f98a7fd28d6eedfb80e5d7d1a92d67aa3dc4783f Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 6 Mar 2023 14:45:02 -0500 Subject: Move WeakMap and WeakKeyMap code to weakmap.c These classes don't belong in gc.c as they're not actually part of the GC. This commit refactors the code by moving all the code into a weakmap.c file. --- internal/gc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal') diff --git a/internal/gc.h b/internal/gc.h index ad0ceac7de..73b6e6fed0 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -243,6 +243,9 @@ void rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache); size_t rb_gc_obj_slot_size(VALUE obj); bool rb_gc_size_allocatable_p(size_t size); int rb_objspace_garbage_object_p(VALUE obj); +bool rb_gc_is_ptr_to_obj(void *ptr); +VALUE rb_gc_id2ref_obj_tbl(VALUE objid); +VALUE rb_define_finalizer_no_check(VALUE obj, VALUE block); void rb_gc_mark_and_move(VALUE *ptr); -- cgit v1.2.3