Ruby  2.0.0p353(2013-11-22revision43784)
Data Structures | Macros | Typedefs | Enumerations | Functions
st.h File Reference
#include "ruby/defines.h"
Include dependency graph for st.h:
This graph shows which files directly or indirectly include this file:

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 SIZEOF_ST_INDEX_T   SIZEOF_VOIDP
 
#define ST_INDEX_BITS   (sizeof(st_index_t) * CHAR_BIT)
 
#define st_is_member(table, key)   st_lookup((table),(key),(st_data_t *)0)
 
#define st_hash_start(h)   ((st_index_t)(h))
 

Typedefs

typedef unsigned long st_data_t
 
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 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 }
 

Functions

st_tablest_init_table (const struct st_hash_type *)
 
st_tablest_init_table_with_size (const struct st_hash_type *, st_index_t)
 
st_tablest_init_numtable (void)
 
st_tablest_init_numtable_with_size (st_index_t)
 
st_tablest_init_strtable (void)
 
st_tablest_init_strtable_with_size (st_index_t)
 
st_tablest_init_strcasetable (void)
 
st_tablest_init_strcasetable_with_size (st_index_t)
 
int st_delete (st_table *, st_data_t *, st_data_t *)
 
int st_delete_safe (st_table *, st_data_t *, st_data_t *, st_data_t)
 
int st_insert (st_table *, st_data_t, st_data_t)
 
int st_insert2 (st_table *, st_data_t, st_data_t, st_data_t(*)(st_data_t))
 
int st_lookup (st_table *, st_data_t, st_data_t *)
 
int st_get_key (st_table *, st_data_t, st_data_t *)
 
int st_update (st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg)
 
int st_foreach (st_table *, int(*)(ANYARGS), st_data_t)
 
int st_foreach_check (st_table *, int(*)(ANYARGS), st_data_t, st_data_t)
 
int st_reverse_foreach (st_table *, int(*)(ANYARGS), st_data_t)
 
void st_add_direct (st_table *, st_data_t, st_data_t)
 
void st_free_table (st_table *)
 
void st_cleanup_safe (st_table *, st_data_t)
 
void st_clear (st_table *)
 
st_tablest_copy (st_table *)
 
int st_numcmp (st_data_t, st_data_t)
 
st_index_t st_numhash (st_data_t)
 
int st_strcasecmp (const char *s1, const char *s2)
 
int st_strncasecmp (const char *s1, const char *s2, size_t n)
 
size_t st_memsize (const st_table *)
 
st_index_t st_hash (const void *ptr, size_t len, st_index_t h)
 
st_index_t st_hash_uint32 (st_index_t h, uint32_t i)
 
st_index_t st_hash_uint (st_index_t h, st_index_t i)
 
st_index_t st_hash_end (st_index_t h)
 
st_index_t st_hash_start (st_index_t h)
 

Macro Definition Documentation

#define CHAR_BIT   8

Definition at line 47 of file st.h.

#define SIZEOF_ST_INDEX_T   SIZEOF_VOIDP

Definition at line 68 of file st.h.

Referenced by st_hash().

#define ST_DATA_T_DEFINED

Definition at line 41 of file st.h.

#define st_hash_start (   h)    ((st_index_t)(h))

Definition at line 144 of file st.h.

Referenced by rb_hash_start().

#define ST_INDEX_BITS   (sizeof(st_index_t) * CHAR_BIT)

Definition at line 75 of file st.h.

#define st_is_member (   table,
  key 
)    st_lookup((table),(key),(st_data_t *)0)

Definition at line 106 of file st.h.

Typedef Documentation

typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP==(int) sizeof(st_index_t)?1:-1]

Definition at line 67 of file st.h.

typedef int st_compare_func(st_data_t, st_data_t)

Definition at line 64 of file st.h.

typedef unsigned long st_data_t

Definition at line 35 of file st.h.

typedef st_index_t st_hash_func(st_data_t)

Definition at line 65 of file st.h.

Definition at line 63 of file st.h.

typedef struct st_table st_table

Definition at line 61 of file st.h.

typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)

Definition at line 124 of file st.h.

Enumeration Type Documentation

enum st_retval
Enumerator
ST_CONTINUE 
ST_STOP 
ST_DELETE 
ST_CHECK 

Definition at line 108 of file st.h.

Function Documentation

void st_add_direct ( st_table ,
st_data_t  ,
st_data_t   
)
void st_cleanup_safe ( st_table ,
st_data_t   
)
void st_clear ( st_table )
st_table* st_copy ( st_table )
int st_delete ( st_table ,
st_data_t ,
st_data_t  
)
int st_delete_safe ( st_table ,
st_data_t ,
st_data_t ,
st_data_t   
)

Referenced by rb_hash_delete_key().

int st_foreach ( st_table ,
int(*)(ANYARGS ,
st_data_t   
)

Definition at line 1000 of file st.c.

References st_table::bins, st_table::entries_packed, FIND_ENTRY, st_table_entry::fore, st_table_entry::hash, hash(), st_table::head, i, st_table_entry::key, key, last, st_table_entry::next, st_table::num_bins, PHASH, PKEY, PVAL, st_table::real_entries, st_table_entry::record, remove_entry(), remove_packed_entry(), ST_CHECK, ST_CONTINUE, ST_DELETE, st_free_entry, ST_STOP, and val.

Referenced by class_instance_method_list(), clear_coverage(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), enc_names(), exit_handler(), extract_keywords(), fc_i(), get_loaded_features_index(), include_modules_at(), mark_const_tbl(), mark_hash(), mark_m_tbl(), mark_marshal_compat_t(), mark_set(), mark_tbl(), proc_waitall(), rb_ary_uniq(), rb_ary_uniq_bang(), rb_check_deadlock(), rb_check_exec_env(), rb_check_exec_options(), rb_clear_trace_func(), rb_coverage_result(), rb_econv_asciicompat_encoding(), rb_enc_aliases(), rb_enc_name_list(), rb_execarg_extract_options(), rb_execarg_fixup(), rb_feature_p(), rb_free_const_table(), rb_free_m_table(), rb_mod_init_copy(), rb_obj_singleton_methods(), rb_objspace_call_finalizer(), rb_prepend_module(), rb_singleton_class_clone_and_attach(), rb_sym_all_symbols(), rb_thread_atfork_internal(), rb_thread_fd_close(), rb_thread_keys(), rb_thread_list(), rb_thread_terminate_all(), rb_vm_check_redefinition_by_prepend(), rb_vm_mark(), rb_waitpid(), reachable_objects_from(), thgroup_list(), transcode_search_path(), validate_labels(), wmap_free(), wmap_mark(), and wmap_memsize().

int st_foreach_check ( st_table ,
int(*)(ANYARGS ,
st_data_t  ,
st_data_t   
)
void st_free_table ( st_table )
int st_get_key ( st_table ,
st_data_t  ,
st_data_t  
)

Referenced by rb_feature_p().

st_index_t st_hash ( const void *  ptr,
size_t  len,
st_index_t  h 
)

Definition at line 1313 of file st.c.

References CHAR_BIT, murmur_finish(), murmur_step, MurmurMagic, SIZEOF_ST_INDEX_T, and UNALIGNED_ADD_ALL.

Referenced by hash_i(), and strhash().

st_index_t st_hash_end ( st_index_t  h)

Definition at line 1477 of file st.c.

References murmur_step.

st_index_t st_hash_start ( st_index_t  h)

Definition at line 1486 of file st.c.

st_index_t st_hash_uint ( st_index_t  h,
st_index_t  i 
)

Definition at line 1446 of file st.c.

References i, murmur1, and v.

st_index_t st_hash_uint32 ( st_index_t  h,
uint32_t  i 
)

Definition at line 1440 of file st.c.

References murmur_step.

st_table* st_init_numtable ( void  )
st_table* st_init_numtable_with_size ( st_index_t  )

Definition at line 278 of file st.c.

References st_init_table_with_size(), and type_numhash.

Referenced by Init_sym().

st_table* st_init_strcasetable ( void  )
st_table* st_init_strcasetable_with_size ( st_index_t  )

Definition at line 302 of file st.c.

References st_init_table_with_size().

st_table* st_init_strtable ( void  )

Definition at line 284 of file st.c.

References st_init_table().

Referenced by Init_load(), load_lock(), ruby_init_ext(), and zone_str().

st_table* st_init_strtable_with_size ( st_index_t  )

Definition at line 290 of file st.c.

References st_init_table_with_size().

st_table* st_init_table ( const struct st_hash_type )

Definition at line 266 of file st.c.

References st_init_table_with_size().

Referenced by rb_hash_tbl(), 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   
)
int st_insert ( st_table ,
st_data_t  ,
st_data_t   
)
int st_insert2 ( st_table ,
st_data_t  ,
st_data_t  ,
st_data_t(*)(st_data_t  
)

Referenced by enc_alias_internal().

int st_lookup ( st_table ,
st_data_t  ,
st_data_t  
)

Referenced by add_opt_method(), autoload_data(), autoload_defined_p(), autoload_delete(), classname(), constat_handle(), constat_reset(), cv_i(), cvar_lookup_at(), define_final0(), eql_i(), fc_path(), features_index_add_single(), flatten(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), get_syserr(), get_transcoder_entry(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), ivar_get(), load_lock(), lookup_method_table(), make_transcoder_entry(), method_entry_i(), obj_alloc_by_klass(), ole_vstr2wc(), r_entry0(), r_leave(), r_object0(), r_symlink(), rb_alias_variable(), rb_ary_diff(), rb_autoload(), rb_check_id(), rb_check_id_cstr(), rb_const_defined_0(), rb_const_get_0(), rb_const_set(), rb_copy_generic_ivar(), rb_econv_asciicompat_encoding(), rb_enc_registered(), rb_f_untrace_var(), rb_feature_p(), rb_gc_copy_finalizer(), rb_generic_ivar_memsize(), rb_generic_ivar_table(), rb_global_entry(), rb_hash_aref(), rb_hash_fetch_m(), rb_hash_has_key(), rb_hash_lookup2(), rb_id2str(), rb_intern3(), rb_intern_str(), rb_ivar_count(), rb_ivar_defined(), rb_ivar_foreach(), rb_ivar_set(), rb_mark_generic_ivar(), rb_method_entry_make(), rb_obj_frozen_p(), rb_obj_remove_instance_variable(), rb_thread_key_p(), rb_thread_local_aref(), rb_thread_variable_p(), rb_tmp_class_path(), rb_vm_check_redefinition_opt_method(), register_label(), remove_method(), 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(), set_const_visibility(), set_syserr(), socklist_lookup(), sv_i(), syserr_initialize(), transcode_search_path(), transcode_search_path_i(), val2dispatch(), vm_callee_setup_keyword_arg(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_object(), w_symbol(), wmap_aref(), and wmap_aset().

size_t st_memsize ( const st_table )
int st_numcmp ( st_data_t  ,
st_data_t   
)

Definition at line 1569 of file st.c.

Referenced by STATIC_ASSERT().

st_index_t st_numhash ( st_data_t  )

Definition at line 1575 of file st.c.

Referenced by STATIC_ASSERT().

int st_reverse_foreach ( st_table ,
int(*)(ANYARGS ,
st_data_t   
)
int st_strcasecmp ( const char *  s1,
const char *  s2 
)

Definition at line 1500 of file st.c.

int st_strncasecmp ( const char *  s1,
const char *  s2,
size_t  n 
)

Definition at line 1524 of file st.c.

int st_update ( st_table table,
st_data_t  key,
st_update_callback_func func,
st_data_t  arg 
)