зеркало из https://github.com/github/ruby.git
Use rb_ident_hash_new instead of rb_hash_new_compare_by_id
The latter is same as the former, removed the duplicate function.
This commit is contained in:
Родитель
0f283054e7
Коммит
bdddaa9f56
|
@ -54,7 +54,7 @@ rb_coverage_start(int argc, VALUE *argv, VALUE klass)
|
|||
}
|
||||
|
||||
if (mode & COVERAGE_TARGET_METHODS) {
|
||||
me2counter = rb_hash_new_compare_by_id();
|
||||
me2counter = rb_ident_hash_new();
|
||||
}
|
||||
else {
|
||||
me2counter = Qnil;
|
||||
|
|
8
hash.c
8
hash.c
|
@ -1364,14 +1364,6 @@ rb_hash_new(void)
|
|||
return hash_alloc(rb_cHash);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_hash_new_compare_by_id(void)
|
||||
{
|
||||
VALUE hash = rb_hash_new();
|
||||
RHASH_ST_TABLE_SET(hash, rb_init_identtable());
|
||||
return hash;
|
||||
}
|
||||
|
||||
MJIT_FUNC_EXPORTED VALUE
|
||||
rb_hash_new_with_size(st_index_t size)
|
||||
{
|
||||
|
|
|
@ -1605,9 +1605,6 @@ struct st_table *rb_hash_tbl_raw(VALUE hash);
|
|||
#endif
|
||||
|
||||
VALUE rb_hash_new_with_size(st_index_t size);
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
VALUE rb_hash_new_compare_by_id(void);
|
||||
RUBY_SYMBOL_EXPORT_END
|
||||
VALUE rb_hash_has_key(VALUE hash, VALUE key);
|
||||
VALUE rb_hash_default_value(VALUE hash, VALUE key);
|
||||
VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
|
||||
|
|
|
@ -2020,7 +2020,7 @@ rb_autoload_str(VALUE mod, ID id, VALUE file)
|
|||
}
|
||||
file = rb_fstring(file);
|
||||
if (!autoload_featuremap) {
|
||||
autoload_featuremap = rb_hash_new_compare_by_id();
|
||||
autoload_featuremap = rb_ident_hash_new();
|
||||
rb_obj_hide(autoload_featuremap);
|
||||
rb_gc_register_mark_object(autoload_featuremap);
|
||||
}
|
||||
|
|
|
@ -2028,7 +2028,7 @@ rb_catch_obj(VALUE t, VALUE (*func)(), VALUE data)
|
|||
static void
|
||||
local_var_list_init(struct local_var_list *vars)
|
||||
{
|
||||
vars->tbl = rb_hash_new_compare_by_id();
|
||||
vars->tbl = rb_ident_hash_new();
|
||||
RBASIC_CLEAR_CLASS(vars->tbl);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче