Remove dead rb_st_nth_key

This commit is contained in:
Peter Zhu 2025-02-13 14:02:31 -05:00
parent 31162bf426
commit e0cb069c06
Notes: git 2025-02-13 21:11:55 +00:00
2 changed files with 0 additions and 15 deletions

14
st.c
View File

@ -2309,20 +2309,6 @@ rb_hash_bulk_insert_into_st_table(long argc, const VALUE *argv, VALUE hash)
st_insert_generic(tab, argc, argv, hash);
}
// to iterate iv_index_tbl
st_data_t
rb_st_nth_key(st_table *tab, st_index_t index)
{
if (LIKELY(tab->entries_start == 0 &&
tab->num_entries == tab->entries_bound &&
index < tab->num_entries)) {
return tab->entries[index].key;
}
else {
rb_bug("unreachable");
}
}
void
rb_st_compact_table(st_table *tab)
{

View File

@ -1897,7 +1897,6 @@ rb_ivar_defined(VALUE obj, ID id)
}
typedef int rb_ivar_foreach_callback_func(ID key, VALUE val, st_data_t arg);
st_data_t rb_st_nth_key(st_table *tab, st_index_t index);
struct iv_itr_data {
VALUE obj;