diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-03-06 14:45:02 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-03-10 09:32:10 -0500 |
commit | f98a7fd28d6eedfb80e5d7d1a92d67aa3dc4783f (patch) | |
tree | 708f7767536d811c812393ffb1d2a71039bef09b /internal | |
parent | dd47ce10dbfca9292e88bbbd3d7f37e3ea503034 (diff) | |
download | ruby-f98a7fd28d6eedfb80e5d7d1a92d67aa3dc4783f.tar.gz |
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.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/gc.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |