Ruby
2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
|
Go to the documentation of this file.
10 #if defined(__cplusplus)
21 #if SIZEOF_LONG == SIZEOF_VOIDP
23 #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
26 # error ---->> st.c requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
28 #define ST_DATA_T_DEFINED
53 #define MAX_ST_INDEX_VAL (~(st_index_t) 0)
59 #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
66 #define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
68 #if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR) && defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
69 # define ST_DATA_COMPATIBLE_P(type) \
70 __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
72 # define ST_DATA_COMPATIBLE_P(type) 0
97 #define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
102 #define st_init_table rb_st_init_table
104 #define st_init_table_with_size rb_st_init_table_with_size
106 #define st_init_numtable rb_st_init_numtable
108 #define st_init_numtable_with_size rb_st_init_numtable_with_size
110 #define st_init_strtable rb_st_init_strtable
112 #define st_init_strtable_with_size rb_st_init_strtable_with_size
114 #define st_init_strcasetable rb_st_init_strcasetable
116 #define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size
118 #define st_delete rb_st_delete
120 #define st_delete_safe rb_st_delete_safe
122 #define st_shift rb_st_shift
124 #define st_insert rb_st_insert
126 #define st_insert2 rb_st_insert2
128 #define st_lookup rb_st_lookup
130 #define st_get_key rb_st_get_key
136 #define st_update rb_st_update
140 #define st_foreach_with_replace rb_st_foreach_with_replace
142 #define st_foreach rb_st_foreach
144 #define st_foreach_check rb_st_foreach_check
146 #define st_keys rb_st_keys
148 #define st_keys_check rb_st_keys_check
150 #define st_values rb_st_values
152 #define st_values_check rb_st_values_check
154 #define st_add_direct rb_st_add_direct
156 #define st_free_table rb_st_free_table
158 #define st_cleanup_safe rb_st_cleanup_safe
160 #define st_clear rb_st_clear
162 #define st_copy rb_st_copy
164 #define st_numcmp rb_st_numcmp
166 #define st_numhash rb_st_numhash
168 #define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp
170 #define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp
171 #define st_strcasecmp rb_st_locale_insensitive_strcasecmp
172 #define st_strncasecmp rb_st_locale_insensitive_strncasecmp
174 #define st_memsize rb_st_memsize
176 #define st_hash rb_st_hash
178 #define st_hash_uint32 rb_st_hash_uint32
180 #define st_hash_uint rb_st_hash_uint
182 #define st_hash_end rb_st_hash_end
184 #define st_hash_start(h) ((st_index_t)(h))
190 #if defined(__cplusplus)
#define RUBY_SYMBOL_EXPORT_END
void rb_st_clear(st_table *)
void rb_st_cleanup_safe(st_table *, st_data_t)
int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
unsigned char entry_power
st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never)
st_table * rb_st_init_table_with_size(const struct st_hash_type *, st_index_t)
st_table * rb_st_init_strcasetable(void)
void rb_st_free_table(st_table *)
int rb_st_delete(st_table *, st_data_t *, st_data_t *)
st_table * rb_st_init_numtable_with_size(st_index_t)
st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size)
void rb_st_add_direct(st_table *, st_data_t, st_data_t)
CONSTFUNC(int rb_st_numcmp(st_data_t, st_data_t))
int st_compare_func(st_data_t, st_data_t)
st_index_t rb_st_hash_start(st_index_t h)
void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE)
st_table * rb_st_init_strtable_with_size(st_index_t)
int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t)
int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int)
int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg)
st_table * rb_st_init_table(const struct st_hash_type *)
int st_foreach_callback_func(st_data_t, st_data_t, st_data_t)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
st_index_t st_hash_func(st_data_t)
int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg)
int(* compare)(st_data_t, st_data_t)
int rb_st_insert(st_table *, st_data_t, st_data_t)
st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size)
st_table * rb_st_init_strcasetable_with_size(st_index_t)
int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t)
#define RUBY_SYMBOL_EXPORT_BEGIN
const struct st_hash_type * type
PUREFUNC(int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2))
unsigned int rebuilds_num
int rb_st_shift(st_table *, st_data_t *, st_data_t *)
st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never)
int rb_st_get_key(st_table *, st_data_t, st_data_t *)
int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t(*)(st_data_t))
st_table * rb_st_copy(st_table *)
int rb_st_lookup(st_table *, st_data_t, st_data_t *)
char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t) ? 1 :-1]
st_table * rb_st_init_strtable(void)
st_table * rb_st_init_numtable(void)
int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t)
st_index_t(* hash)(st_data_t)