Ruby 1.9.3p327(2012-11-10revision37606)
Data Structures | Defines | Typedefs | Enumerations | Functions
include/ruby/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

Defines

#define ST_DATA_T_DEFINED
#define CHAR_BIT   8
#define _(args)   args
#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]

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_foreach (st_table *, int(*)(ANYARGS), 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)

Define Documentation

#define _ (   args)    args

Definition at line 51 of file st.h.

#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 133 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 98 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.

Definition at line 64 of file st.h.

typedef unsigned long st_data_t

Definition at line 35 of file st.h.

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.


Enumeration Type Documentation

enum st_retval
Enumerator:
ST_CONTINUE 
ST_STOP 
ST_DELETE 
ST_CHECK 

Definition at line 100 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   
)
int st_foreach ( st_table ,
int(*)(ANYARGS)  ,
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 1074 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 1238 of file st.c.

References murmur_step.

st_index_t st_hash_start ( st_index_t  h)

Definition at line 1247 of file st.c.

st_index_t st_hash_uint ( st_index_t  h,
st_index_t  i 
)

Definition at line 1207 of file st.c.

References murmur1.

st_index_t st_hash_uint32 ( st_index_t  h,
uint32_t  i 
)

Definition at line 1201 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 211 of file st.c.

References st_init_table_with_size().

Referenced by init_case_fold_table(), and Init_sym().

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

Definition at line 235 of file st.c.

References st_init_table_with_size().

st_table* st_init_strtable ( void  )
st_table* st_init_strtable_with_size ( st_index_t  )

Definition at line 223 of file st.c.

References st_init_table_with_size().

st_table* st_init_table ( const struct st_hash_type )

Definition at line 199 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(), and rb_hash_aset().

int st_lookup ( st_table ,
st_data_t  ,
st_data_t  
)

Referenced by add_opt_method(), autoload_delete(), autoload_node(), autoload_node_id(), block_append_gen(), classname(), define_final(), eql_i(), fc_path(), fcntl(), flatten(), generic_ivar_defined(), generic_ivar_get(), generic_ivar_remove(), generic_ivar_set(), get_syserr(), get_transcoder_entry(), hash_update(), is_socket(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_load(), iseq_set_sequence(), ivar_get(), load_lock(), make_transcoder_entry(), map_charset(), method_entry_i(), numhash_aref(), obj_alloc_by_path(), ole_vstr2wc(), overlapped_socket_io(), r_entry0(), r_leave(), r_object0(), r_symlink(), rb_alias_variable(), rb_ary_diff(), rb_autoload(), rb_class_path(), 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_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_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_vm_check_redefinition_opt_method(), recvmsg(), register_label(), remove_method(), search_method(), sendmsg(), set_const_visibility(), set_syserr(), sv_i(), syck_emit(), syck_emitter_mark_node(), syck_hdlr_add_anchor(), syck_hdlr_get_anchor(), syck_lookup_sym(), syserr_initialize(), transcode_search_path(), transcode_search_path_i(), vm_get_ev_const(), vm_getivar(), vm_setivar(), w_class(), w_encoding(), w_object(), w_symbol(), and zone_str().

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

Definition at line 1330 of file st.c.

st_index_t st_numhash ( st_data_t  )

Definition at line 1336 of file st.c.

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

Definition at line 1261 of file st.c.

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

Definition at line 1285 of file st.c.