summaryrefslogtreecommitdiff
path: root/internal/gc.h
diff options
context:
space:
mode:
authoreileencodes <[email protected]>2024-03-25 13:53:51 -0400
committerPeter Zhu <[email protected]>2024-03-26 14:29:36 -0400
commite16086b7f25d334c8049bd0e237191bdb3300d88 (patch)
tree4cefaf13d402b54c27f9391ec7c81e3a6f982c54 /internal/gc.h
parent16cf9047c63aad5483bebe2068cdaa832447ba77 (diff)
Refactor init_copy gc attributes
This PR moves `rb_copy_wb_protected_attribute` and `rb_gc_copy_finalizer` into a single function called `rb_gc_copy_attributes` to be called by `init_copy`. This reduces the surface area of the GC API. Co-authored-by: Peter Zhu <[email protected]>
Diffstat (limited to 'internal/gc.h')
-rw-r--r--internal/gc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gc.h b/internal/gc.h
index 595dbb9ef6..82a1b901f8 100644
--- a/internal/gc.h
+++ b/internal/gc.h
@@ -197,7 +197,7 @@ void rb_objspace_set_event_hook(const rb_event_flag_t event);
VALUE rb_objspace_gc_enable(struct rb_objspace *);
VALUE rb_objspace_gc_disable(struct rb_objspace *);
void ruby_gc_set_params(void);
-void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
+void rb_gc_copy_attributes(VALUE dest, VALUE obj);
size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */
size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE); /* used in iseq.h */
size_t rb_malloc_grow_capa(size_t current_capacity, size_t type_size);