Remove rb_hash_st_table

It's a duplicate of RHASH_ST_TABLE.
This commit is contained in:
Peter Zhu 2023-01-31 13:30:50 -05:00
parent 2866f951c5
commit 2296b877d8
Notes: git 2023-01-31 20:48:31 +00:00
3 changed files with 2 additions and 10 deletions

7
hash.c
View File

@ -579,13 +579,6 @@ rb_hash_ar_table_p(VALUE hash)
}
}
st_table *
rb_hash_st_table(VALUE hash)
{
HASH_ASSERT(!RHASH_AR_TABLE_P(hash));
return RHASH(hash)->as.st;
}
void
rb_hash_st_table_set(VALUE hash, st_table *st)
{

View File

@ -82,7 +82,6 @@ VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
extern st_table *rb_hash_st_table(VALUE hash);
VALUE rb_ident_hash_new_with_size(st_index_t size);
static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);

View File

@ -2278,7 +2278,7 @@ obj_traverse_rec(struct obj_traverse_data *data)
{
if (UNLIKELY(!data->rec)) {
data->rec_hash = rb_ident_hash_new();
data->rec = rb_hash_st_table(data->rec_hash);
data->rec = RHASH_ST_TABLE(data->rec_hash);
}
return data->rec;
}
@ -2710,7 +2710,7 @@ obj_traverse_replace_rec(struct obj_traverse_replace_data *data)
{
if (UNLIKELY(!data->rec)) {
data->rec_hash = rb_ident_hash_new();
data->rec = rb_hash_st_table(data->rec_hash);
data->rec = RHASH_ST_TABLE(data->rec_hash);
}
return data->rec;
}