summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-05-02 14:45:52 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-05-03 09:07:39 -0400
commitfe7c02c7444495679ff88f957c327b2d46c8e143 (patch)
tree6a882215cd34097ed879dfb01a5a211f7731d788 /load.c
parent35e111fd3e38ee6f44cd67b255815ef301ac5211 (diff)
downloadruby-fe7c02c7444495679ff88f957c327b2d46c8e143.tar.gz
Remove _with_gc functions in darray
darray was used in YJIT which required the functions to not trigger GC. YJIT has now moved to Rust and does not use darray anymore, so we can remove the functions that don't trigger GC and only keep the ones that trigger GC.
Diffstat (limited to 'load.c')
-rw-r--r--load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/load.c b/load.c
index 496188d850..f2f55fde2b 100644
--- a/load.c
+++ b/load.c
@@ -226,7 +226,7 @@ features_index_add_single_callback(st_data_t *key, st_data_t *value, st_data_t r
VALUE this_feature_path = RARRAY_AREF(loaded_features, FIX2LONG(this_feature_index));
feature_indexes_t feature_indexes;
- rb_darray_make_with_gc(&feature_indexes, 2);
+ rb_darray_make(&feature_indexes, 2);
int top = (rb && !is_rbext_path(this_feature_path)) ? 1 : 0;
rb_darray_set(feature_indexes, top^0, FIX2LONG(this_feature_index));
rb_darray_set(feature_indexes, top^1, FIX2LONG(offset));
@@ -254,7 +254,7 @@ features_index_add_single_callback(st_data_t *key, st_data_t *value, st_data_t r
}
}
- rb_darray_append_with_gc(&feature_indexes, FIX2LONG(offset));
+ rb_darray_append(&feature_indexes, FIX2LONG(offset));
/* darray may realloc which will change the pointer */
*value = (st_data_t)feature_indexes;
@@ -344,7 +344,7 @@ loaded_features_index_clear_i(st_data_t key, st_data_t val, st_data_t arg)
{
VALUE obj = (VALUE)val;
if (!SPECIAL_CONST_P(obj)) {
- rb_darray_free_with_gc((void *)obj);
+ rb_darray_free((void *)obj);
}
return ST_DELETE;
}