diff options
author | Peter Zhu <[email protected]> | 2024-06-10 10:02:05 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-06-11 10:33:51 -0400 |
commit | 32683aa18db667ac740bc562eca5989640ae1612 (patch) | |
tree | 2fd4724f9d94d359d38f410756f634098c4a4ce6 /variable.c | |
parent | 89ebe8993fd3b7fec977eced1a46f54bcd75ae07 (diff) |
Remove use of symbols and arrays when freeing global table
This removes the use of symbol and array objects when freeing the global
table so we can now free symbols and arrays earlier.
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c index 657cbdc889..8be3d9fdb5 100644 --- a/variable.c +++ b/variable.c @@ -451,7 +451,7 @@ struct rb_global_entry { }; static enum rb_id_table_iterator_result -free_global_entry_i(ID key, VALUE val, void *arg) +free_global_entry_i(VALUE val, void *arg) { struct rb_global_entry *entry = (struct rb_global_entry *)val; if (entry->var->counter == 1) { @@ -467,7 +467,7 @@ free_global_entry_i(ID key, VALUE val, void *arg) void rb_free_rb_global_tbl(void) { - rb_id_table_foreach(rb_global_tbl, free_global_entry_i, 0); + rb_id_table_foreach_values(rb_global_tbl, free_global_entry_i, 0); rb_id_table_free(rb_global_tbl); } |