Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "ruby/defines.h"
Go to the source code of this file.
Data Structures | |
struct | st_hash_type |
struct | st_table |
Macros | |
#define | ST_DATA_T_DEFINED |
#define | CHAR_BIT 8 |
#define | MAX_ST_INDEX_VAL (~(st_index_t) 0) |
#define | SIZEOF_ST_INDEX_T SIZEOF_VOIDP |
#define | ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT) |
#define | ST_DATA_COMPATIBLE_P(type) 0 |
#define | st_is_member(table, key) st_lookup((table),(key),(st_data_t *)0) |
#define | st_strcasecmp st_locale_insensitive_strcasecmp |
#define | st_strncasecmp st_locale_insensitive_strncasecmp |
#define | st_hash_start(h) ((st_index_t)(h)) |
Typedefs | |
typedef struct st_table | st_table |
typedef st_data_t | st_index_t |
typedef int | st_compare_func(st_data_t, st_data_t) |
typedef st_index_t | st_hash_func(st_data_t) |
typedef char | st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t) ? 1 :-1] |
typedef struct st_table_entry | st_table_entry |
typedef int | st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) |
Enumerations | |
enum | st_retval { ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK } |
Variables | |
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long | st_data_t |
#define MAX_ST_INDEX_VAL (~(st_index_t) 0) |
#define ST_DATA_COMPATIBLE_P | ( | type | ) | 0 |
Definition at line 72 of file st.h.
Referenced by rb_hash_keys(), and rb_hash_values().
#define st_hash_start | ( | h | ) | ((st_index_t)(h)) |
#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT) |
#define st_strcasecmp st_locale_insensitive_strcasecmp |
#define st_strncasecmp st_locale_insensitive_strncasecmp |
typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t) ? 1 :-1] |
typedef st_index_t st_hash_func(st_data_t) |
typedef st_data_t st_index_t |
typedef struct st_table_entry st_table_entry |
CONSTFUNC | ( | int | st_numcmpst_data_t, st_data_t | ) |
CONSTFUNC | ( | st_index_t | st_numhashst_data_t | ) |
CONSTFUNC | ( | st_index_t | st_hash_uint32st_index_t h, uint32_t i | ) |
CONSTFUNC | ( | st_index_t | st_hash_uintst_index_t h, st_index_t i | ) |
CONSTFUNC | ( | st_index_t | st_hash_endst_index_t h | ) |
PUREFUNC | ( | int | st_locale_insensitive_strcasecmpconst char *s1, const char *s2 | ) |
PUREFUNC | ( | int | st_locale_insensitive_strncasecmpconst char *s1, const char *s2, size_t n | ) |
PUREFUNC | ( | size_t | st_memsizeconst st_table * | ) |
PUREFUNC | ( | st_index_t | st_hashconst void *ptr, size_t len, st_index_t h | ) |
Definition at line 1237 of file st.c.
References st_table::bins, malloc, and NULL.
Referenced by st_foreach_safe().
void st_free_table | ( | st_table * | ) |
Definition at line 666 of file st.c.
References st_table::bins, st_table::entries, free, and NULL.
st_table* st_init_numtable | ( | void | ) |
Definition at line 610 of file st.c.
References st_init_table(), and type_numhash.
st_table* st_init_numtable_with_size | ( | st_index_t | ) |
Definition at line 617 of file st.c.
References st_init_table_with_size(), and type_numhash.
st_table* st_init_strcasetable | ( | void | ) |
st_table* st_init_strcasetable_with_size | ( | st_index_t | ) |
Definition at line 648 of file st.c.
References st_init_table_with_size().
st_table* st_init_strtable | ( | void | ) |
Definition at line 625 of file st.c.
References st_init_table().
st_table* st_init_strtable_with_size | ( | st_index_t | ) |
Definition at line 632 of file st.c.
References st_init_table_with_size().
st_table* st_init_table | ( | const struct st_hash_type * | ) |
Definition at line 602 of file st.c.
References st_init_table_with_size().
Referenced by st_init_numtable(), st_init_strcasetable(), and st_init_strtable().
st_table* st_init_table_with_size | ( | const struct st_hash_type * | , |
st_index_t | |||
) |
Definition at line 555 of file st.c.
References getenv.
Referenced by st_init_numtable_with_size(), st_init_strcasetable_with_size(), st_init_strtable_with_size(), and st_init_table().
st_index_t st_keys | ( | st_table * | table, |
st_data_t * | keys, | ||
st_index_t | size | ||
) |
Definition at line 1592 of file st.c.
Referenced by rb_hash_keys().
st_index_t st_keys_check | ( | st_table * | table, |
st_data_t * | keys, | ||
st_index_t | size, | ||
st_data_t | never | ||
) |
Definition at line 1038 of file st.c.
References bin, and st_table_entry::hash.
Definition at line 1335 of file st.c.
References bin, st_table::bins, DELETED_ENTRY_P, st_table::entries, st_table::entries_bound, st_table::entries_start, st_table_entry::key, NULL, and st_table_entry::record.
int st_update | ( | st_table * | table, |
st_data_t | key, | ||
st_update_callback_func * | func, | ||
st_data_t | arg | ||
) |
st_index_t st_values | ( | st_table * | table, |
st_data_t * | values, | ||
st_index_t | size | ||
) |
Definition at line 1630 of file st.c.
Referenced by rb_hash_values().
st_index_t st_values_check | ( | st_table * | table, |
st_data_t * | values, | ||
st_index_t | size, | ||
st_data_t | never | ||
) |
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t |
Definition at line 22 of file st.h.
Referenced by ole_vstr2wc(), onig_st_lookup_strend(), rb_autoload_str(), rb_class_path_cached(), rb_cvar_get(), rb_cvar_set(), rb_econv_asciicompat_encoding(), rb_enc_registered(), rb_enc_unicode_p(), rb_free_generic_ivar(), rb_gc_copy_finalizer(), rb_get_kwargs(), rb_hash_delete_entry(), rb_ivar_defined(), rb_ivar_lookup(), rb_mod_remove_cvar(), rb_obj_remove_instance_variable(), rb_str_free(), rb_undefine_finalizer(), rsock_intern_family(), rsock_intern_family_noprefix(), rsock_intern_ip_optname(), rsock_intern_iplevel(), rsock_intern_ipproto(), rsock_intern_ipv6_optname(), rsock_intern_local_optname(), rsock_intern_protocol_family(), rsock_intern_scm_optname(), rsock_intern_so_optname(), rsock_intern_socktype(), rsock_intern_tcp_optname(), rsock_intern_udp_optname(), ruby_register_rollback_func_for_ensure(), st_hash(), and st_update().