Files
Hiroshi SHIBATAandClaude Opus 5 cc3ba11012 Use rb_len_t in the C API for lengths and indices
Once rb_len_t widens this changes the `long *` output parameters of rb_range_beg_len(), rb_str_subpos(), rb_arithmetic_sequence_beg_len_step(), ruby_enc_find_basename() and ruby_enc_find_extname(), so extensions passing `long *` to them will need to be updated. The extension guides list these signatures verbatim and follow along.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-09 14:00:15 +09:00

33 lines
1.3 KiB
C

#ifndef INTERNAL_ST_H
#define INTERNAL_ST_H
#include "ruby/st.h"
st_table *rb_st_replace(st_table *new_tab, st_table *old_tab);
#define st_replace rb_st_replace
st_table *rb_st_init_existing_table_with_size(st_table *tab, const struct st_hash_type *type, st_index_t size);
#define st_init_existing_table_with_size rb_st_init_existing_table_with_size
st_table *rb_st_init_existing_numtable_with_size(st_table *tab, st_index_t size);
#define st_init_existing_numtable_with_size rb_st_init_existing_numtable_with_size
st_table *rb_st_init_existing_strtable_with_size(st_table *tab, st_index_t size);
#define st_init_existing_strtable_with_size rb_st_init_existing_strtable_with_size
size_t rb_st_allocated_memsize(const st_table *tab);
#define st_allocated_memsize rb_st_allocated_memsize
void rb_st_free_embedded_table(st_table *tab);
#define st_free_embedded_table rb_st_free_embedded_table
int rb_st_insert_no_rebuild(st_table *tab, st_data_t key, st_data_t value);
#define st_insert_no_rebuild rb_st_insert_no_rebuild
typedef int st_foreach_with_hash_callback_func(st_data_t, st_data_t, st_data_t, st_data_t);
int rb_st_foreach_with_hash(st_table *, st_foreach_with_hash_callback_func *, st_data_t);
#define st_foreach_with_hash rb_st_foreach_with_hash
void rb_hash_bulk_insert_into_st_table(rb_len_t, const VALUE *, VALUE);
#endif