From ff4f9cf95d73cc2730949df583bf0e41702d7aae Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 7 May 2020 10:07:57 -0700 Subject: Allow global variables to move This patch allows global variables that have been assigned in Ruby to move. I added a new function for the GC to call that will update global references and introduced a new callback in the global variable struct for updating references. Only pure Ruby global variables are supported right now, other references will be pinned. --- internal/variable.h | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/variable.h') diff --git a/internal/variable.h b/internal/variable.h index a3b8f7963d..8defc1523c 100644 --- a/internal/variable.h +++ b/internal/variable.h @@ -28,6 +28,7 @@ struct rb_global_entry { /* variable.c */ void rb_gc_mark_global_tbl(void); +void rb_gc_update_global_tbl(void); size_t rb_generic_ivar_memsize(VALUE); VALUE rb_search_class_path(VALUE); VALUE rb_attr_delete(VALUE, ID); -- cgit v1.2.3