Ruby
1.9.3p551(2014-11-13revision48407)
|
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/util.h"
#include "ruby/encoding.h"
#include <errno.h>
Go to the source code of this file.
Data Structures | |
struct | foreach_safe_arg |
struct | hash_foreach_arg |
struct | rehash_arg |
struct | shift_var |
struct | equal_data |
struct | update_arg |
Macros | |
#define | HASH_DELETED FL_USER1 |
#define | HASH_PROC_DEFAULT FL_USER2 |
#define | GET_ENVIRON(e) (e) |
#define | FREE_ENVIRON(e) |
#define | ENVMATCH(n1, n2) (strcmp((n1), (n2)) == 0) |
#define | ENVNMATCH(s1, s2, n) (memcmp((s1), (s2), (n)) == 0) |
#define | rb_intern(str) rb_intern_const(str) |
Typedefs | |
typedef int | st_foreach_func (st_data_t, st_data_t, st_data_t) |
typedef int | rb_foreach_func (VALUE, VALUE, VALUE) |
Variables | |
VALUE | rb_cHash |
static VALUE | envtbl |
static ID | id_hash |
static ID | id_yield |
static ID | id_default |
static struct st_hash_type | objhash |
static struct st_hash_type | identhash |
static int | path_tainted = -1 |
static char ** | origenviron |
char ** | environ |
#define ENVMATCH | ( | n1, | |
n2 | |||
) | (strcmp((n1), (n2)) == 0) |
Definition at line 2037 of file hash.c.
Referenced by env_aset(), env_delete(), env_fetch(), and rb_f_getenv().
#define FREE_ENVIRON | ( | e | ) |
Definition at line 2031 of file hash.c.
Referenced by env_each_pair(), env_empty_p(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_select(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_values(), and envix().
Definition at line 2030 of file hash.c.
Referenced by env_each_pair(), env_empty_p(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_select(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_values(), envix(), and ruby_setenv().
#define HASH_DELETED FL_USER1 |
Definition at line 26 of file hash.c.
Referenced by hash_foreach_ensure(), hash_foreach_iter(), and rb_hash_delete_key().
#define HASH_PROC_DEFAULT FL_USER2 |
Definition at line 27 of file hash.c.
Referenced by hash_equal(), rb_hash_aref(), rb_hash_default(), rb_hash_default_proc(), rb_hash_dup(), rb_hash_initialize(), rb_hash_replace(), rb_hash_set_default(), rb_hash_set_default_proc(), and rb_hash_shift().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Definition at line 1864 of file hash.c.
References args, Qundef, rb_assoc_new(), rb_equal(), RTEST, ST_CONTINUE, and ST_STOP.
Referenced by rb_hash_assoc().
Definition at line 282 of file hash.c.
References n, rb_eTypeError, rb_proc_arity(), rb_proc_lambda_p(), and rb_raise().
Referenced by rb_hash_initialize(), and rb_hash_set_default_proc().
Definition at line 889 of file hash.c.
References Qundef, rb_hash_delete_key(), rb_yield_values(), RTEST, and ST_CONTINUE.
Referenced by rb_hash_delete_if(), and rb_hash_reject_bang().
Definition at line 1265 of file hash.c.
References Qundef, rb_yield(), and ST_CONTINUE.
Referenced by rb_hash_each_key().
Definition at line 1299 of file hash.c.
References Qundef, rb_assoc_new(), rb_yield(), and ST_CONTINUE.
Referenced by rb_hash_each_pair().
Definition at line 1230 of file hash.c.
References Qundef, rb_yield(), and ST_CONTINUE.
Referenced by rb_hash_each_value().
Definition at line 2373 of file hash.c.
References env_delete(), ENVMATCH, name, NIL_P, OBJ_TAINTED, PATH_ENV, path_tainted_p(), Qnil, rb_eArgError, rb_eSecurityError, rb_raise(), rb_safe_level, RSTRING_LEN, RSTRING_PTR, ruby_setenv(), StringValue, val, and value.
Referenced by env_replace_i(), env_update_i(), and Init_Hash().
Definition at line 2883 of file hash.c.
References e, getenv(), Qnil, rb_assoc_new(), rb_eArgError, rb_raise(), rb_secure(), rb_tainted_str_new2(), RSTRING_LEN, s, and StringValuePtr.
Referenced by Init_Hash().
Definition at line 2058 of file hash.c.
References env_str_new2(), ENVMATCH, getenv(), PATH_ENV, Qnil, rb_eArgError, rb_raise(), rb_secure(), RSTRING_LEN, RSTRING_PTR, ruby_setenv(), SafeStringValue, val, and value.
Referenced by env_aset(), env_delete_m(), env_reject_bang(), env_replace(), env_select_bang(), env_shift(), and rb_env_clear().
Definition at line 2587 of file hash.c.
References env_reject_bang(), envtbl, and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 2091 of file hash.c.
References env_delete(), NIL_P, rb_block_given_p(), rb_yield(), and val.
Referenced by Init_Hash().
Definition at line 2444 of file hash.c.
References env_keys(), i, keys, RARRAY_LEN, RARRAY_PTR(), rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 2518 of file hash.c.
References ary, env, env_str_new(), env_str_new2(), FREE_ENVIRON, GET_ENVIRON, i, RARRAY_LEN, RARRAY_PTR(), rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_secure(), rb_yield(), RETURN_ENUMERATOR, s, and strchr().
Referenced by Init_Hash().
Definition at line 2493 of file hash.c.
References env_values(), i, RARRAY_LEN, RARRAY_PTR(), rb_yield(), and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 2839 of file hash.c.
References env, FREE_ENVIRON, GET_ENVIRON, Qfalse, Qtrue, and rb_secure().
Referenced by Init_Hash().
Definition at line 2148 of file hash.c.
References env, env_path_tainted(), env_str_new2(), ENVMATCH, getenv(), key, PATH_ENV, rb_block_given_p(), rb_eArgError, rb_eKeyError, rb_filesystem_str_new_cstr(), rb_raise(), rb_scan_args(), rb_secure(), rb_warn(), rb_yield(), RSTRING_LEN, RSTRING_PTR, and SafeStringValue.
Referenced by Init_Hash().
Definition at line 2863 of file hash.c.
References getenv(), Qfalse, Qtrue, rb_eArgError, rb_raise(), rb_secure(), RSTRING_LEN, s, and StringValuePtr.
Referenced by Init_Hash().
Definition at line 2904 of file hash.c.
References env, FREE_ENVIRON, GET_ENVIRON, len, NIL_P, Qfalse, Qnil, Qtrue, rb_check_string_type(), rb_secure(), RSTRING_LEN, RSTRING_PTR, s, strchr(), and strlen().
Referenced by Init_Hash().
Definition at line 2998 of file hash.c.
References env_key(), and rb_warn().
Referenced by Init_Hash().
Definition at line 2738 of file hash.c.
References env, FREE_ENVIRON, GET_ENVIRON, i, OBJ_TAINT, rb_inspect(), rb_secure(), rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(), rb_str_buf_new2(), rb_str_new2(), s, str, and strchr().
Referenced by Init_Hash().
Definition at line 3081 of file hash.c.
References env_to_hash(), and rb_hash_invert().
Referenced by Init_Hash().
Definition at line 2690 of file hash.c.
References env_select_bang(), envtbl, and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 2967 of file hash.c.
References env, env_str_new(), FREE_ENVIRON, GET_ENVIRON, len, Qnil, rb_secure(), RSTRING_LEN, RSTRING_PTR, s, str, strchr(), StringValue, and strlen().
Referenced by env_index(), and Init_Hash().
Definition at line 2415 of file hash.c.
References ary, env, env_str_new(), FREE_ENVIRON, GET_ENVIRON, rb_ary_new(), rb_ary_push(), rb_secure(), s, and strchr().
Referenced by env_each_key(), env_reject_bang(), env_replace(), env_select_bang(), Init_Hash(), and rb_env_clear().
Definition at line 2185 of file hash.c.
References path_tainted, and path_tainted_p().
Referenced by env_fetch(), and rb_f_getenv().
Definition at line 2935 of file hash.c.
References env, FREE_ENVIRON, GET_ENVIRON, len, NIL_P, Qnil, rb_assoc_new(), rb_check_string_type(), rb_secure(), rb_tainted_str_new(), result, RSTRING_LEN, RSTRING_PTR, s, strchr(), and strlen().
Referenced by Init_Hash().
Definition at line 3041 of file hash.c.
References env_to_hash(), and rb_hash_delete_if().
Referenced by Init_Hash().
Definition at line 2555 of file hash.c.
References env_delete(), env_keys(), envtbl, FL_TAINT, FL_UNSET, i, keys, NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_f_getenv(), rb_yield_values(), RETURN_ENUMERATOR, RTEST, and val.
Referenced by env_delete_if(), and Init_Hash().
Definition at line 3106 of file hash.c.
References env, env_delete(), env_keys(), env_replace_i(), i, keys, RARRAY_LEN, RARRAY_PTR(), rb_hash_foreach(), and to_hash().
Referenced by Init_Hash().
Definition at line 3087 of file hash.c.
References env_aset(), Qnil, Qundef, rb_ary_delete(), rb_ary_includes(), and ST_CONTINUE.
Referenced by env_replace().
Definition at line 2625 of file hash.c.
References env, env_str_new(), env_str_new2(), FREE_ENVIRON, GET_ENVIRON, rb_hash_aset(), rb_hash_new(), rb_secure(), rb_yield_values(), result, RETURN_ENUMERATOR, RTEST, s, strchr(), and v.
Referenced by Init_Hash().
Definition at line 2658 of file hash.c.
References env_delete(), env_keys(), envtbl, FL_TAINT, FL_UNSET, i, keys, NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_f_getenv(), rb_yield_values(), RETURN_ENUMERATOR, RTEST, and val.
Referenced by env_keep_if(), and Init_Hash().
Definition at line 3054 of file hash.c.
References env, env_delete(), env_str_new(), env_str_new2(), FREE_ENVIRON, GET_ENVIRON, getenv(), key, Qnil, rb_assoc_new(), rb_secure(), RSTRING_PTR, s, strchr(), and val.
Referenced by Init_Hash().
Definition at line 2819 of file hash.c.
References env, FREE_ENVIRON, GET_ENVIRON, i, INT2FIX, and rb_secure().
Referenced by Init_Hash().
Definition at line 2042 of file hash.c.
References rb_locale_str_new(), rb_obj_freeze(), and str.
Referenced by env_each_pair(), env_key(), env_keys(), env_select(), env_shift(), env_str_new2(), env_to_a(), and env_to_hash().
Definition at line 2051 of file hash.c.
References env_str_new(), Qnil, and strlen().
Referenced by env_delete(), env_each_pair(), env_fetch(), env_select(), env_shift(), env_to_a(), env_to_hash(), env_values(), and rb_f_getenv().
Definition at line 2778 of file hash.c.
References ary, env, env_str_new(), env_str_new2(), FREE_ENVIRON, GET_ENVIRON, rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_secure(), s, and strchr().
Referenced by Init_Hash().
Definition at line 3012 of file hash.c.
References env, env_str_new(), env_str_new2(), FREE_ENVIRON, GET_ENVIRON, hash, rb_hash_aset(), rb_hash_new(), rb_secure(), s, and strchr().
Referenced by env_invert(), env_reject(), and Init_Hash().
Definition at line 2726 of file hash.c.
References rb_usascii_str_new2().
Referenced by Init_Hash().
Definition at line 3145 of file hash.c.
References env, env_update_i(), rb_hash_foreach(), rb_secure(), and to_hash().
Referenced by Init_Hash().
Definition at line 3123 of file hash.c.
References env_aset(), Qnil, Qundef, rb_block_given_p(), rb_f_getenv(), rb_yield_values(), and ST_CONTINUE.
Referenced by env_update().
Definition at line 2464 of file hash.c.
References ary, env, env_str_new2(), FREE_ENVIRON, GET_ENVIRON, rb_ary_new(), rb_ary_push(), rb_secure(), s, and strchr().
Referenced by env_each_value(), and Init_Hash().
Definition at line 2602 of file hash.c.
References argc, i, Qnil, rb_ary_new(), rb_ary_push(), rb_f_getenv(), rb_secure(), and result.
Referenced by Init_Hash().
Definition at line 2215 of file hash.c.
References env, ENVNMATCH, FREE_ENVIRON, GET_ENVIRON, i, len, and strlen().
Referenced by ruby_setenv().
Definition at line 1568 of file hash.c.
References data, equal_data::eql, Qfalse, Qundef, rb_eql(), rb_equal(), equal_data::result, ST_CONTINUE, st_lookup, ST_STOP, and equal_data::tbl.
Referenced by recursive_eql().
|
static |
Definition at line 123 of file hash.c.
References foreach_safe_arg::arg, foreach_safe_arg::func, Qundef, ST_CHECK, ST_CONTINUE, and status.
Referenced by st_foreach_safe().
Definition at line 218 of file hash.c.
References hash, NEWOBJ, OBJSETUP, Qnil, RHASH_IFNONE, and T_HASH.
Referenced by Init_Hash(), rb_hash_new(), rb_hash_rehash(), and rb_hash_s_create().
Definition at line 1599 of file hash.c.
References equal_data::eql, FL_TEST, HASH_PROC_DEFAULT, Qfalse, Qtrue, rb_eql(), rb_equal(), rb_exec_recursive_paired(), rb_intern, rb_respond_to(), recursive_eql(), RHASH, RHASH_IFNONE, RHASH_SIZE, T_HASH, equal_data::tbl, and TYPE.
Referenced by rb_hash_eql(), and rb_hash_equal().
|
static |
Definition at line 195 of file hash.c.
References hash_foreach_arg::hash, hash_foreach_iter(), Qnil, rb_eRuntimeError, rb_raise(), RHASH, and st_foreach.
Referenced by rb_hash_foreach().
Definition at line 181 of file hash.c.
References FL_TEST, FL_UNSET, HASH_DELETED, Qundef, RHASH, and st_cleanup_safe.
Referenced by rb_hash_foreach().
|
static |
Definition at line 157 of file hash.c.
References hash_foreach_arg::arg, FL_SET, hash_foreach_arg::func, hash_foreach_arg::hash, HASH_DELETED, key, Qundef, rb_eRuntimeError, rb_raise(), RHASH, ST_CHECK, ST_CONTINUE, ST_DELETE, st_delete_safe, ST_STOP, status, and tbl.
Referenced by hash_foreach_call().
Definition at line 1670 of file hash.c.
References hval, Qundef, rb_hash(), ST_CONTINUE, and st_hash().
Referenced by recursive_hash().
Definition at line 274 of file hash.c.
References rb_eRuntimeError, rb_raise(), RHASH, and st_lookup.
Referenced by rb_hash_aset(), rb_hash_update_block_i(), rb_hash_update_func_i(), and rb_hash_update_i().
Definition at line 3167 of file hash.c.
References env_aset(), env_assoc(), env_delete_if(), env_delete_m(), env_each_key(), env_each_pair(), env_each_value(), env_empty_p(), env_fetch(), env_has_key(), env_has_value(), env_index(), env_inspect(), env_invert(), env_keep_if(), env_key(), env_keys(), env_none(), env_rassoc(), env_reject(), env_reject_bang(), env_replace(), env_select(), env_select_bang(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_to_s(), env_update(), env_values(), env_values_at(), environ, envtbl, hash_alloc(), id_default, id_hash, id_yield, rb_cHash, rb_cObject, rb_define_alias(), rb_define_alloc_func(), rb_define_class(), rb_define_global_const(), rb_define_method(), rb_define_singleton_method(), rb_env_clear(), rb_extend_object(), rb_f_getenv(), rb_hash_aref(), rb_hash_aset(), rb_hash_assoc(), rb_hash_clear(), rb_hash_compare_by_id(), rb_hash_compare_by_id_p(), rb_hash_default(), rb_hash_default_proc(), rb_hash_delete(), rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_empty_p(), rb_hash_eql(), rb_hash_equal(), rb_hash_fetch_m(), rb_hash_flatten(), rb_hash_has_key(), rb_hash_has_value(), rb_hash_hash(), rb_hash_index(), rb_hash_initialize(), rb_hash_inspect(), rb_hash_invert(), rb_hash_keep_if(), rb_hash_key(), rb_hash_keys(), rb_hash_merge(), rb_hash_rassoc(), rb_hash_rehash(), rb_hash_reject(), rb_hash_reject_bang(), rb_hash_replace(), rb_hash_s_create(), rb_hash_s_try_convert(), rb_hash_select(), rb_hash_select_bang(), rb_hash_set_default(), rb_hash_set_default_proc(), rb_hash_shift(), rb_hash_size(), rb_hash_to_a(), rb_hash_to_hash(), rb_hash_update(), rb_hash_values(), rb_hash_values_at(), rb_include_module(), rb_intern, rb_mEnumerable, and rb_obj_alloc().
Definition at line 1391 of file hash.c.
References inspect_i(), OBJ_INFECT, rb_hash_foreach(), rb_str_buf_cat2(), rb_str_buf_new2(), rb_usascii_str_new2(), and str.
Referenced by rb_hash_inspect().
Definition at line 1368 of file hash.c.
References OBJ_INFECT, Qundef, rb_enc_copy(), rb_inspect(), rb_str_buf_append(), rb_str_buf_cat2(), rb_str_cat2(), RSTRING_LEN, and ST_CONTINUE.
Referenced by inspect_hash().
Definition at line 1021 of file hash.c.
References Qundef, rb_yield_values(), RTEST, ST_CONTINUE, and ST_DELETE.
Referenced by rb_hash_keep_if(), and rb_hash_select_bang().
Definition at line 735 of file hash.c.
References args, key, rb_equal(), ST_CONTINUE, and ST_STOP.
Referenced by rb_hash_key().
Definition at line 1437 of file hash.c.
References Qundef, rb_ary_push(), and ST_CONTINUE.
Referenced by rb_hash_keys().
Definition at line 2179 of file hash.c.
References rb_path_check().
Referenced by env_aset(), env_path_tainted(), and rb_env_path_tainted().
Definition at line 1902 of file hash.c.
References args, Qundef, rb_assoc_new(), rb_equal(), RTEST, ST_CONTINUE, and ST_STOP.
Referenced by rb_hash_rassoc().
|
static |
Definition at line 78 of file hash.c.
References FIX2LONG, hval, rb_hash(), rb_hash_end(), rb_hash_start(), rb_str_hash(), T_FALSE, T_FIXNUM, T_NIL, T_STRING, T_SYMBOL, T_TRUE, and TYPE.
Definition at line 423 of file hash.c.
References rb_check_convert_type(), and T_HASH.
Referenced by rb_econv_prepare_options(), and rb_hash_s_try_convert().
Definition at line 2704 of file hash.c.
References env_delete(), env_keys(), envtbl, i, keys, NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_f_getenv(), and val.
Referenced by Init_Hash(), and rb_run_exec_options_err().
Definition at line 2194 of file hash.c.
References getenv(), PATH_ENV, path_tainted, and path_tainted_p().
Referenced by security().
Definition at line 2110 of file hash.c.
References env, env_path_tainted(), env_str_new2(), ENVMATCH, getenv(), PATH_ENV, Qnil, rb_eArgError, rb_filesystem_str_new_cstr(), rb_obj_freeze(), rb_raise(), rb_secure(), RSTRING_LEN, RSTRING_PTR, SafeStringValue, and str.
Referenced by env_reject_bang(), env_select_bang(), env_update_i(), env_values_at(), Init_Hash(), and rb_env_clear().
Definition at line 60 of file hash.c.
References hval, id_hash, LONG2FIX, rb_funcall(), rb_to_int(), RBIGNUM_DIGITS, T_BIGNUM, T_FIXNUM, and TYPE.
Referenced by cdhash_hash(), hash_i(), nucomp_hash(), nurat_hash(), rb_any_hash(), recursive_hash(), and time_hash().
Definition at line 518 of file hash.c.
References CLASS_OF, FL_TEST, HASH_PROC_DEFAULT, id_default, rb_funcall(), rb_method_basic_definition_p(), RHASH, RHASH_IFNONE, st_lookup, and val.
Referenced by cParser_initialize(), cState_configure(), cto_i(), dir_initialize(), econv_opts(), econv_primitive_convert(), extract_binmode(), gc_profile_result(), generate_json_object(), group_by_i(), hash2ptr_dispparams(), hash2result(), Init_Hash(), io_s_write(), JSON_parse_object(), mString_Extend_json_create(), open_key_args(), parse_main(), rawmode_opt(), rb_econv_open_opts(), rb_econv_prepare_options(), rb_hash_update_block_i(), rb_hash_update_func_i(), rb_hash_values_at(), rb_io_extract_modeenc(), rb_io_initialize(), rb_str_sub_bang(), realpath_rec(), recursive_list_access(), str_gsub(), syck_emitter_emit(), syck_get_hash_aref(), syck_map_initialize(), syck_map_value_set(), syck_parser_load(), syck_parser_load_documents(), syck_resolver_transfer(), tr_setup_table(), and transcode_loop().
Definition at line 1133 of file hash.c.
References copy_str_key(), hash_update(), rb_cString, rb_hash_modify(), rb_obj_class(), RHASH, st_insert, st_insert2(), and val.
Definition at line 1891 of file hash.c.
References args, assoc_i(), obj, Qnil, and rb_hash_foreach().
Referenced by Init_Hash().
Definition at line 1093 of file hash.c.
References clear_i(), hash, rb_hash_foreach(), rb_hash_modify_check(), RHASH, and st_clear().
Referenced by Init_Hash(), and rb_hash_replace().
Definition at line 1986 of file hash.c.
References hash, identhash, rb_hash_modify(), rb_hash_rehash(), and RHASH.
Referenced by Init_Hash().
Definition at line 636 of file hash.c.
References FL_TEST, HASH_PROC_DEFAULT, id_yield, key, Qnil, rb_funcall(), rb_scan_args(), and RHASH_IFNONE.
Referenced by Init_Hash().
Definition at line 694 of file hash.c.
References FL_TEST, HASH_PROC_DEFAULT, Qnil, and RHASH_IFNONE.
Referenced by Init_Hash().
Definition at line 818 of file hash.c.
References Qnil, Qundef, rb_block_given_p(), rb_hash_delete_key(), rb_hash_modify(), rb_yield(), and val.
Definition at line 914 of file hash.c.
References delete_if_i(), hash, rb_hash_foreach(), rb_hash_modify(), and RETURN_ENUMERATOR.
Referenced by env_reject(), fdbm_reject(), fgdbm_reject(), fsdbm_reject(), Init_Hash(), and rb_hash_reject().
Definition at line 782 of file hash.c.
References FL_SET, HASH_DELETED, Qundef, RHASH, st_delete, st_delete_safe, and val.
Referenced by delete_if_i(), rb_hash_delete(), and rb_hash_shift().
Definition at line 235 of file hash.c.
References DUPSETUP, FL_SET, FL_TEST, HASH_PROC_DEFAULT, NEWOBJ, ret, RHASH, RHASH_EMPTY_P, RHASH_IFNONE, and st_copy.
Referenced by io_s_write().
Definition at line 1291 of file hash.c.
References each_key_i(), hash, rb_hash_foreach(), and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1329 of file hash.c.
References each_pair_i(), hash, rb_hash_foreach(), and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1257 of file hash.c.
References each_value_i(), hash, rb_hash_foreach(), and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1224 of file hash.c.
References Qfalse, Qtrue, and RHASH_EMPTY_P.
Referenced by Init_Hash().
Definition at line 1664 of file hash.c.
References hash_equal(), and TRUE.
Referenced by Init_Hash().
Definition at line 1650 of file hash.c.
References FALSE, and hash_equal().
Referenced by Init_Hash().
Definition at line 609 of file hash.c.
References rb_hash_fetch_m().
Definition at line 581 of file hash.c.
References key, NIL_P, rb_any_to_s(), rb_block_given_p(), rb_eKeyError, rb_inspect(), rb_protect(), rb_raise(), rb_scan_args(), rb_str_ellipsize(), rb_warn(), rb_yield(), RHASH, RSTRING_PTR, st_lookup, and val.
Referenced by Init_Hash(), and rb_hash_fetch().
Definition at line 1955 of file hash.c.
References ary, INT2FIX, rb_funcall2(), rb_hash_to_a(), and rb_intern.
Referenced by Init_Hash().
Definition at line 204 of file hash.c.
References hash_foreach_arg::arg, func, hash_foreach_arg::func, hash_foreach_arg::hash, hash, hash_foreach_call(), hash_foreach_ensure(), rb_ensure(), and RHASH.
Definition at line 30 of file hash.c.
References rb_obj_freeze().
Referenced by rb_coverage_result(), and rb_econv_prepare_options().
Definition at line 1514 of file hash.c.
References Qfalse, Qtrue, RHASH, and st_lookup.
Referenced by Init_Hash(), rb_hash_update_block_i(), and rb_hash_update_func_i().
Definition at line 1551 of file hash.c.
References data, Qfalse, rb_hash_foreach(), rb_hash_search_value(), and val.
Referenced by Init_Hash().
Definition at line 1708 of file hash.c.
References rb_exec_recursive_outer(), and recursive_hash().
Referenced by Init_Hash().
Definition at line 775 of file hash.c.
References rb_hash_key(), and rb_warn().
Referenced by Init_Hash().
Definition at line 328 of file hash.c.
References default_proc_arity_check(), FL_SET, hash, HASH_PROC_DEFAULT, rb_block_given_p(), rb_block_proc(), rb_eArgError, rb_hash_modify(), rb_raise(), rb_scan_args(), and RHASH_IFNONE.
Referenced by Init_Hash().
Definition at line 1416 of file hash.c.
References inspect_hash(), rb_exec_recursive(), rb_usascii_str_new2(), and RHASH_EMPTY_P.
Referenced by Init_Hash().
Definition at line 1734 of file hash.c.
References rb_hash_foreach(), rb_hash_invert_i(), and rb_hash_new().
Referenced by env_invert(), and Init_Hash().
Definition at line 1714 of file hash.c.
References Qundef, rb_hash_aset(), and ST_CONTINUE.
Referenced by rb_hash_invert().
Definition at line 1067 of file hash.c.
References hash, keep_if_i(), rb_hash_foreach(), rb_hash_modify(), and RETURN_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 761 of file hash.c.
References args, key_i(), Qnil, rb_hash_foreach(), and value.
Referenced by Init_Hash(), and rb_hash_index().
Definition at line 1457 of file hash.c.
References ary, keys_i(), rb_ary_new(), and rb_hash_foreach().
Referenced by Init_Hash().
Definition at line 546 of file hash.c.
References Qnil, and rb_hash_lookup2().
Definition at line 535 of file hash.c.
References RHASH, st_lookup, and val.
Referenced by ary_add_hash_by(), rb_ary_sample(), rb_ary_shuffle_bang(), rb_hash_lookup(), rb_io_extract_encoding_option(), recursive_check(), recursive_pop(), and recursive_push().
Definition at line 1858 of file hash.c.
References rb_hash_update(), and rb_obj_dup().
Referenced by Init_Hash().
Definition at line 267 of file hash.c.
References rb_hash_modify_check(), and rb_hash_tbl().
Referenced by rb_hash_aset(), rb_hash_compare_by_id(), rb_hash_delete(), rb_hash_delete_if(), rb_hash_initialize(), rb_hash_keep_if(), rb_hash_reject_bang(), rb_hash_select_bang(), rb_hash_set_default(), rb_hash_set_default_proc(), rb_hash_shift(), rb_hash_update(), and rb_hash_update_by().
Definition at line 250 of file hash.c.
References OBJ_UNTRUSTED, rb_check_frozen, rb_eSecurityError, rb_raise(), and rb_safe_level.
Referenced by rb_hash_clear(), rb_hash_modify(), rb_hash_rehash(), and rb_hash_replace().
Definition at line 229 of file hash.c.
References hash_alloc(), and rb_cHash.
Referenced by allocate_cbsubst_info(), ary_tmp_hash_new(), check_exec_fds(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), cState_to_h(), date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__xmlschema(), date_s__strptime_internal(), date_zone_to_diff(), enum_group_by(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_profile_record_get(), gc_stat(), id_hash_new(), Init_iconv(), Init_ossl_asn1(), Init_ossl_x509name(), Init_tkutil(), Init_VM(), io_s_write(), iseq_data_to_ary(), iseq_set_sequence(), JSON_parse_object(), make_compile_option_value(), mString_to_json_raw_object(), ole_const_load(), ossl_dh_get_params(), ossl_dsa_get_params(), ossl_rsa_get_params(), ossl_sslctx_get_session_cache_stats(), r_object0(), rb_coverage_result(), rb_coverage_start(), rb_econv_prepare_options(), rb_enc_aliases(), rb_hash_invert(), rb_hash_select(), rb_realpath_internal(), rb_reg_named_captures(), rb_w32_init_file(), recursive_list_access(), recursive_push(), ripper_init_eventids1(), ripper_init_eventids2_table(), sig_list(), syck_emitter_reset(), syck_genericresolver_node_import(), syck_get_hash_aref(), syck_out_map(), syck_parser_initialize(), syck_parser_load(), syck_parser_load_documents(), syck_resolver_initialize(), syck_resolver_node_import(), tr_setup_table(), tr_trans(), and yaml_org_handler().
Definition at line 1928 of file hash.c.
References args, obj, Qnil, rassoc_i(), and rb_hash_foreach().
Referenced by Init_Hash().
Definition at line 480 of file hash.c.
References hash, hash_alloc(), rb_eRuntimeError, rb_hash_foreach(), rb_hash_modify_check(), rb_hash_rehash_i(), rb_raise(), RHASH, st_free_table, st_init_table_with_size, and tbl.
Referenced by Init_Hash(), and rb_hash_compare_by_id().
Definition at line 451 of file hash.c.
References Qundef, ST_CONTINUE, st_insert, and tbl.
Referenced by rb_hash_rehash().
Definition at line 958 of file hash.c.
References rb_hash_delete_if(), and rb_obj_dup().
Referenced by Init_Hash().
Definition at line 932 of file hash.c.
References delete_if_i(), hash, n, Qnil, rb_hash_foreach(), rb_hash_modify(), RETURN_ENUMERATOR, and RHASH.
Referenced by Init_Hash().
Definition at line 1169 of file hash.c.
References FL_SET, FL_TEST, FL_UNSET, hash, HASH_PROC_DEFAULT, rb_hash_clear(), rb_hash_foreach(), rb_hash_modify_check(), rb_hash_tbl(), replace_i(), RHASH, RHASH_IFNONE, and to_hash().
Referenced by Init_Hash().
Definition at line 368 of file hash.c.
References argc, hash, hash_alloc(), i, key, NIL_P, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_check_array_type(), rb_eArgError, rb_hash_aset(), rb_hash_s_try_convert(), rb_raise(), RHASH, st_copy, v, and val.
Referenced by Init_Hash().
Definition at line 440 of file hash.c.
References rb_check_hash_type().
Referenced by Init_Hash(), and rb_hash_s_create().
Definition at line 1525 of file hash.c.
References data, Qtrue, Qundef, rb_equal(), ST_CONTINUE, and ST_STOP.
Referenced by rb_hash_has_value().
Definition at line 1010 of file hash.c.
References rb_hash_foreach(), rb_hash_new(), result, RETURN_ENUMERATOR, and select_i().
Referenced by Init_Hash().
Definition at line 1040 of file hash.c.
References hash, keep_if_i(), n, Qnil, rb_hash_foreach(), rb_hash_modify(), RETURN_ENUMERATOR, and RHASH.
Referenced by Init_Hash().
Definition at line 670 of file hash.c.
References FL_UNSET, HASH_PROC_DEFAULT, rb_hash_modify(), and RHASH_IFNONE.
Referenced by Init_Hash().
Definition at line 716 of file hash.c.
References b, default_proc_arity_check(), FL_SET, HASH_PROC_DEFAULT, NIL_P, proc, rb_check_convert_type(), rb_eTypeError, rb_hash_modify(), rb_obj_classname(), rb_obj_is_proc(), rb_raise(), RHASH_IFNONE, and T_DATA.
Referenced by Init_Hash().
Definition at line 861 of file hash.c.
References FL_TEST, HASH_PROC_DEFAULT, id_yield, shift_var::key, Qnil, Qundef, rb_assoc_new(), rb_funcall(), rb_hash_delete_key(), rb_hash_foreach(), rb_hash_modify(), RHASH, RHASH_IFNONE, shift_i_safe(), st_shift(), and shift_var::val.
Referenced by Init_Hash().
Definition at line 258 of file hash.c.
References RHASH, and st_init_table.
Referenced by iseq_set_sequence(), rb_hash_modify(), and rb_hash_replace().
Definition at line 1356 of file hash.c.
References ary, OBJ_INFECT, rb_ary_new(), rb_hash_foreach(), and to_a_i().
Referenced by Init_Hash(), and rb_hash_flatten().
Definition at line 1787 of file hash.c.
References rb_block_given_p(), rb_hash_foreach(), rb_hash_modify(), rb_hash_update_block_i(), rb_hash_update_i(), and to_hash().
Referenced by Init_Hash(), and rb_hash_merge().
Definition at line 1752 of file hash.c.
References hash_update(), Qundef, rb_hash_aref(), rb_hash_has_key(), rb_yield_values(), RHASH, ST_CONTINUE, and st_insert.
Referenced by rb_hash_update().
VALUE rb_hash_update_by | ( | VALUE | hash1, |
VALUE | hash2, | ||
rb_hash_update_func * | func | ||
) |
Definition at line 1821 of file hash.c.
References func, update_arg::func, update_arg::hash, rb_hash_foreach(), rb_hash_modify(), rb_hash_update_func_i(), rb_hash_update_i(), and to_hash().
Definition at line 1806 of file hash.c.
References arg, update_arg::func, update_arg::hash, hash_update(), Qundef, rb_hash_aref(), rb_hash_has_key(), RHASH, ST_CONTINUE, st_insert, and value.
Referenced by rb_hash_update_by().
Definition at line 1743 of file hash.c.
References hash_update(), Qundef, RHASH, ST_CONTINUE, and st_insert.
Referenced by rb_hash_update(), and rb_hash_update_by().
Definition at line 1488 of file hash.c.
References ary, rb_ary_new(), rb_hash_foreach(), and values_i().
Referenced by Init_Hash().
Definition at line 975 of file hash.c.
References argc, i, rb_ary_new2(), rb_ary_push(), rb_hash_aref(), and result.
Referenced by Init_Hash().
Definition at line 1586 of file hash.c.
References data, eql_i(), Qtrue, rb_hash_foreach(), and equal_data::result.
Referenced by hash_equal().
Definition at line 1683 of file hash.c.
References hash_i(), hval, INT2FIX, LONG2FIX, rb_cHash, rb_hash(), rb_hash_end(), rb_hash_foreach(), rb_hash_start(), rb_hash_uint(), and RHASH.
Referenced by rb_hash_hash().
Definition at line 1147 of file hash.c.
References Qundef, rb_hash_aset(), and ST_CONTINUE.
Referenced by rb_hash_replace().
Definition at line 2246 of file hash.c.
References ALLOC_N, buf, envix(), errno, fail, free, GET_ENVIRON, i, len, malloc, origenviron, rb_sprintf(), rb_str_resize(), rb_sys_fail(), REALLOC_N, RSTRING_PTR, ruby_strdup(), setenv, snprintf, str, strchr(), strlen(), unsetenv, and xfree.
Referenced by env_aset(), env_delete(), rb_run_exec_options_err(), and ruby_unsetenv().
Definition at line 2358 of file hash.c.
References ruby_setenv().
Definition at line 987 of file hash.c.
References Qundef, rb_hash_aset(), rb_yield_values(), RTEST, and ST_CONTINUE.
Referenced by rb_hash_select().
Definition at line 837 of file hash.c.
References key, shift_var::key, Qundef, ST_CONTINUE, ST_STOP, shift_var::val, value, and var.
Referenced by rb_hash_shift().
Definition at line 136 of file hash.c.
References a, foreach_safe_arg::arg, foreach_safe_i(), func, foreach_safe_arg::func, rb_eRuntimeError, rb_raise(), st_foreach, table, and foreach_safe_arg::tbl.
Referenced by find_class_path(), givar_i(), obj_ivar_each(), rb_const_list(), rb_f_global_variables(), rb_gc_mark_global_tbl(), rb_ivar_foreach(), rb_mark_generic_ivar_tbl(), rb_mod_class_variables(), rb_mod_const_at(), and w_ivar().
Definition at line 1337 of file hash.c.
References Qundef, rb_ary_push(), rb_assoc_new(), and ST_CONTINUE.
Referenced by rb_hash_to_a().
Definition at line 417 of file hash.c.
References rb_convert_type(), and T_HASH.
Referenced by env_replace(), env_update(), rb_hash_replace(), rb_hash_update(), and rb_hash_update_by().
Definition at line 1468 of file hash.c.
References Qundef, rb_ary_push(), and ST_CONTINUE.
Referenced by rb_hash_values().
char** environ |
Definition at line 6 of file missing-pips.c.
Referenced by compat_init_setproctitle(), and Init_Hash().
|
static |
Definition at line 37 of file hash.c.
Referenced by env_delete_if(), env_keep_if(), env_reject_bang(), env_select_bang(), Init_Hash(), and rb_env_clear().
|
static |
Definition at line 38 of file hash.c.
Referenced by Init_Hash(), and rb_hash_aref().
|
static |
Definition at line 38 of file hash.c.
Referenced by Init_Hash(), and rb_hash().
|
static |
Definition at line 38 of file hash.c.
Referenced by Init_Hash(), rb_hash_default(), and rb_hash_shift().
|
static |
|
static |
|
static |
Definition at line 2016 of file hash.c.
Referenced by ruby_setenv().
|
static |
Definition at line 2014 of file hash.c.
Referenced by env_path_tainted(), and rb_env_path_tainted().
VALUE rb_cHash |
Definition at line 35 of file hash.c.
Referenced by cState_from_state_s(), generate_json(), Init_Hash(), make_compile_option(), rb_hash_new(), recursive_hash(), syck_resolver_node_import(), syck_resolver_transfer(), and w_object().