Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/util.h"
#include "ruby/encoding.h"
#include "internal.h"
#include <errno.h>
#include "probes.h"
Go to the source code of this file.
Data Structures | |
struct | foreach_safe_arg |
struct | hash_foreach_arg |
struct | update_callback_arg |
struct | update_arg |
struct | rehash_arg |
struct | shift_var |
struct | equal_data |
struct | update_func_arg |
struct | reset_hash_type_arg |
Macros | |
#define | HAS_EXTRA_STATES(hash, klass) |
#define | HASH_REJECT_COPY_EXTRA_STATES 1 |
#define | identhash st_hashtype_num |
#define | NOINSERT_UPDATE_CALLBACK(func) |
#define | UPDATE_CALLBACK(iter_lev, func) ((iter_lev) > 0 ? func##_noinsert : func##_insert) |
#define | RHASH_UPDATE_ITER(h, iter_lev, key, func, a) |
#define | RHASH_UPDATE(hash, key, func, arg) RHASH_UPDATE_ITER(hash, RHASH_ITER_LEV(hash), key, func, arg) |
#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 ID | id_flatten_bang |
static const struct st_hash_type | objhash |
const struct st_hash_type | st_hashtype_num |
static int | path_tainted = -1 |
static char ** | origenviron |
char ** | environ |
#define ENVMATCH | ( | n1, | |
n2 | |||
) | (strcmp((n1), (n2)) == 0) |
Definition at line 2519 of file hash.c.
Referenced by env_aset(), env_delete(), env_fetch(), and rb_f_getenv().
#define ENVNMATCH | ( | s1, | |
s2, | |||
n | |||
) | (memcmp((s1), (s2), (n)) == 0) |
#define FREE_ENVIRON | ( | e | ) |
Definition at line 2513 of file hash.c.
Referenced by env_each_pair(), env_empty_p(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_values(), envix(), and rb_env_size().
#define GET_ENVIRON | ( | e | ) | (e) |
Definition at line 2512 of file hash.c.
Referenced by env_each_pair(), env_empty_p(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_values(), envix(), rb_env_size(), and ruby_setenv().
#define HAS_EXTRA_STATES | ( | hash, | |
klass | |||
) |
#define identhash st_hashtype_num |
Definition at line 173 of file hash.c.
Referenced by rb_hash_aset(), rb_hash_assoc(), rb_hash_compare_by_id(), and rb_hash_compare_by_id_p().
#define NOINSERT_UPDATE_CALLBACK | ( | func | ) |
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by hash_equal(), and Init_Hash().
#define RHASH_UPDATE | ( | hash, | |
key, | |||
func, | |||
arg | |||
) | RHASH_UPDATE_ITER(hash, RHASH_ITER_LEV(hash), key, func, arg) |
Definition at line 435 of file hash.c.
Referenced by rb_hash_update_block_i(), rb_hash_update_func_i(), and rb_hash_update_i().
Definition at line 2260 of file hash.c.
References rb_equal(), and RTEST.
Referenced by rb_hash_assoc().
Definition at line 2286 of file hash.c.
References key, rb_assoc_new(), rb_equal(), RTEST, ST_CONTINUE, ST_STOP, and val.
Referenced by rb_hash_assoc().
Definition at line 2746 of file hash.c.
References invalid_envname(), name, and strchr().
Referenced by ruby_setenv().
|
static |
Definition at line 439 of file hash.c.
References 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 1071 of file hash.c.
References key, rb_yield_values(), RTEST, ST_CONTINUE, and ST_DELETE.
Referenced by rb_hash_delete_if(), and rb_hash_reject_bang().
Definition at line 1571 of file hash.c.
References key, rb_yield(), and ST_CONTINUE.
Referenced by rb_hash_each_key().
Definition at line 1604 of file hash.c.
References key, rb_assoc_new(), rb_yield(), and ST_CONTINUE.
Referenced by rb_hash_each_pair().
Definition at line 1611 of file hash.c.
References key, rb_yield_values(), and ST_CONTINUE.
Referenced by rb_hash_each_pair().
Definition at line 1537 of file hash.c.
References rb_yield(), and ST_CONTINUE.
Referenced by rb_hash_each_value().
Definition at line 297 of file hash.c.
References hash_alloc(), rb_sourcefile, rb_sourceline(), RUBY_DTRACE_HASH_CREATE, and RUBY_DTRACE_HASH_CREATE_ENABLED.
Referenced by Init_Hash().
Definition at line 2880 of file hash.c.
References env_delete(), ENVMATCH, name, NIL_P, OBJ_TAINTED, PATH_ENV, path_tainted, path_tainted_p(), Qnil, rb_eArgError, rb_raise(), RSTRING_LEN, RSTRING_PTR, ruby_setenv(), SafeStringValue, and val.
Referenced by env_replace_i(), env_update_i(), and Init_Hash().
Definition at line 3400 of file hash.c.
References getenv, key, Qnil, rb_assoc_new(), rb_eArgError, rb_raise(), rb_tainted_str_new2, RSTRING_LEN, RSTRING_PTR, and SafeStringValue.
Referenced by Init_Hash().
Definition at line 2544 of file hash.c.
References env_str_new2(), ENVMATCH, getenv, name, PATH_ENV, path_tainted, Qnil, rb_eArgError, rb_raise(), RSTRING_LEN, RSTRING_PTR, ruby_setenv(), SafeStringValue, and val.
Referenced by env_aset(), env_delete_m(), env_reject_bang(), env_replace(), env_select_bang(), env_shift(), and rb_env_clear().
Definition at line 3111 of file hash.c.
References env_reject_bang(), envtbl, rb_env_size(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 2576 of file hash.c.
References env_delete(), name, NIL_P, rb_block_given_p(), rb_yield(), and val.
Referenced by Init_Hash().
Definition at line 2962 of file hash.c.
References env_keys(), RARRAY_AREF, RARRAY_LEN, rb_env_size(), rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 3035 of file hash.c.
References env, env_str_new(), env_str_new2(), environ, FREE_ENVIRON, GET_ENVIRON, RARRAY_AREF, RARRAY_LEN, rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_block_arity(), rb_env_size(), rb_yield(), rb_yield_values(), RETURN_SIZED_ENUMERATOR, and strchr().
Referenced by Init_Hash().
Definition at line 3010 of file hash.c.
References env_values(), RARRAY_AREF, RARRAY_LEN, rb_env_size(), rb_yield(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
|
static |
Definition at line 3357 of file hash.c.
References env, environ, FREE_ENVIRON, GET_ENVIRON, Qfalse, and Qtrue.
Referenced by Init_Hash().
Definition at line 2636 of file hash.c.
References argc, argv, env, env_path_tainted(), env_str_new2(), ENVMATCH, getenv, key, PATH_ENV, PRIsVALUE, rb_block_given_p(), rb_eArgError, rb_eKeyError, rb_filesystem_encoding(), rb_filesystem_str_new_cstr(), rb_raise(), rb_scan_args(), rb_str_conv_enc(), rb_str_new(), rb_utf8_encoding(), rb_warn(), rb_yield(), RSTRING_LEN, RSTRING_PTR, SafeStringValue, and strlen().
Referenced by Init_Hash().
Definition at line 3380 of file hash.c.
References getenv, key, Qfalse, Qtrue, rb_eArgError, rb_raise(), RSTRING_LEN, RSTRING_PTR, and SafeStringValue.
Referenced by Init_Hash().
Definition at line 3421 of file hash.c.
References env, environ, FREE_ENVIRON, GET_ENVIRON, NIL_P, Qfalse, Qnil, Qtrue, rb_check_safe_obj(), rb_check_string_type(), RSTRING_LEN, RSTRING_PTR, strchr(), and strlen().
Referenced by Init_Hash().
Definition at line 3514 of file hash.c.
References env_key(), and rb_warn().
Referenced by Init_Hash().
|
static |
Definition at line 3259 of file hash.c.
References env, environ, FREE_ENVIRON, GET_ENVIRON, OBJ_TAINT, rb_inspect(), rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(), rb_str_buf_new2(), rb_str_new2, and strchr().
Referenced by Init_Hash().
|
static |
Definition at line 3597 of file hash.c.
References env_to_hash(), and rb_hash_invert().
Referenced by Init_Hash().
Definition at line 3211 of file hash.c.
References env_select_bang(), envtbl, rb_env_size(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 3484 of file hash.c.
References env, env_str_new(), environ, FREE_ENVIRON, GET_ENVIRON, Qnil, RSTRING_LEN, RSTRING_PTR, SafeStringValue, strchr(), and strlen().
Referenced by env_index(), and Init_Hash().
|
static |
Definition at line 2918 of file hash.c.
References env, env_str_new(), environ, FREE_ENVIRON, GET_ENVIRON, rb_ary_new(), rb_ary_push(), and strchr().
Referenced by env_each_key(), env_reject_bang(), env_replace(), env_select(), env_select_bang(), Init_Hash(), and rb_env_clear().
|
static |
|
static |
Definition at line 2676 of file hash.c.
References path_tainted, and path_tainted_p().
Referenced by env_fetch(), and rb_f_getenv().
Definition at line 3452 of file hash.c.
References env, environ, FREE_ENVIRON, GET_ENVIRON, NIL_P, Qnil, rb_assoc_new(), rb_check_safe_obj(), rb_check_string_type(), rb_tainted_str_new(), result, RSTRING_LEN, RSTRING_PTR, strchr(), and strlen().
Referenced by Init_Hash().
|
static |
Definition at line 3557 of file hash.c.
References env_to_hash(), and rb_hash_delete_if().
Referenced by Init_Hash().
Definition at line 3078 of file hash.c.
References env_delete(), env_keys(), envtbl, FL_TAINT, FL_UNSET, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_env_size(), rb_f_getenv(), rb_yield_values(), RBASIC_CLEAR_CLASS, RETURN_SIZED_ENUMERATOR, RTEST, and val.
Referenced by env_delete_if(), and Init_Hash().
Definition at line 3620 of file hash.c.
References env, env_delete(), env_keys(), env_replace_i(), hash(), RARRAY_AREF, RARRAY_LEN, rb_hash_foreach(), and to_hash().
Referenced by Init_Hash().
Definition at line 3603 of file hash.c.
References env_aset(), key, Qnil, rb_ary_delete(), rb_ary_includes(), ST_CONTINUE, and val.
Referenced by env_replace().
Definition at line 3148 of file hash.c.
References env_keys(), key, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_env_size(), rb_f_getenv(), rb_hash_aset(), rb_hash_new(), rb_yield_values(), result, RETURN_SIZED_ENUMERATOR, RTEST, and val.
Referenced by Init_Hash().
Definition at line 3178 of file hash.c.
References env_delete(), env_keys(), envtbl, FL_TAINT, FL_UNSET, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_env_size(), rb_f_getenv(), rb_yield_values(), RBASIC_CLEAR_CLASS, RETURN_SIZED_ENUMERATOR, RTEST, and val.
Referenced by env_keep_if(), and Init_Hash().
|
static |
Definition at line 3570 of file hash.c.
References env, env_delete(), env_str_new(), env_str_new2(), environ, FREE_ENVIRON, GET_ENVIRON, getenv, key, Qnil, rb_assoc_new(), result, RSTRING_PTR, strchr(), and val.
Referenced by Init_Hash().
|
static |
Definition at line 3338 of file hash.c.
References env, environ, FREE_ENVIRON, GET_ENVIRON, and INT2FIX.
Referenced by Init_Hash().
Definition at line 2524 of file hash.c.
References rb_locale_encoding(), rb_locale_str_new(), rb_obj_freeze(), rb_str_conv_enc(), rb_str_new(), and rb_utf8_encoding().
Referenced by env_each_pair(), env_key(), env_keys(), env_shift(), env_str_new2(), env_to_a(), and env_to_hash().
Definition at line 2537 of file hash.c.
References env_str_new(), Qnil, and strlen().
Referenced by env_delete(), env_each_pair(), env_fetch(), env_shift(), env_to_a(), env_to_hash(), env_values(), and rb_f_getenv().
|
static |
Definition at line 3298 of file hash.c.
References env, env_str_new(), env_str_new2(), environ, FREE_ENVIRON, GET_ENVIRON, rb_ary_new(), rb_ary_push(), rb_assoc_new(), and strchr().
Referenced by Init_Hash().
|
static |
Definition at line 3529 of file hash.c.
References env, env_str_new(), env_str_new2(), environ, FREE_ENVIRON, GET_ENVIRON, hash(), rb_hash_aset(), rb_hash_new(), and strchr().
Referenced by env_invert(), env_reject(), and Init_Hash().
|
static |
Definition at line 3657 of file hash.c.
References env, env_update_i(), hash(), rb_hash_foreach(), and to_hash().
Referenced by Init_Hash().
Definition at line 3637 of file hash.c.
References env_aset(), key, Qnil, rb_block_given_p(), rb_f_getenv(), rb_yield_values(), ST_CONTINUE, and val.
Referenced by env_update().
|
static |
Definition at line 2982 of file hash.c.
References env, env_str_new2(), environ, FREE_ENVIRON, GET_ENVIRON, rb_ary_new(), rb_ary_push(), and strchr().
Referenced by env_each_value(), and Init_Hash().
Definition at line 3126 of file hash.c.
References argc, argv, Qnil, rb_ary_new(), rb_ary_push(), rb_f_getenv(), and result.
Referenced by Init_Hash().
|
static |
Definition at line 2706 of file hash.c.
References env, environ, ENVNMATCH, FREE_ENVIRON, GET_ENVIRON, and strlen().
Referenced by ruby_setenv().
Definition at line 1929 of file hash.c.
References equal_data::eql, key, Qfalse, rb_eql(), rb_equal(), equal_data::result, ST_CONTINUE, st_data_t, st_lookup(), ST_STOP, and equal_data::tbl.
Referenced by recursive_eql().
Definition at line 2381 of file hash.c.
References key, rb_ary_cat(), ST_CONTINUE, and val.
Referenced by rb_hash_flatten().
Definition at line 184 of file hash.c.
References foreach_safe_arg::arg, key, ST_CHECK, ST_CONTINUE, and ST_STOP.
Referenced by st_foreach_safe().
Definition at line 37 of file hash.c.
References st_table::num_entries, rb_cHash, RCLASS_M_TBL, and RCLASS_SUPER.
Definition at line 287 of file hash.c.
References FL_WB_PROTECTED, hash(), NEWOBJ_OF, Qnil, RGENGC_WB_PROTECTED_HASH, RHASH_SET_IFNONE, and T_HASH.
Referenced by empty_hash_alloc(), rb_hash_new(), rb_hash_rehash(), and rb_hash_s_create().
|
static |
Definition at line 1349 of file hash.c.
References update_arg::arg, key, update_arg::new_key, update_arg::new_value, update_arg::old_value, ST_CONTINUE, and val.
Referenced by hash_aset_str(), and rb_hash_aset().
|
static |
Definition at line 1364 of file hash.c.
References hash_aset(), key, rb_str_new_frozen(), and val.
Referenced by rb_hash_aset().
Definition at line 678 of file hash.c.
References CLASS_OF, FL_TEST, hash(), HASH_PROC_DEFAULT, id_default, id_yield, key, Qnil, Qundef, rb_funcall(), rb_method_basic_definition_p(), and RHASH_IFNONE.
Referenced by rb_hash_aref(), and rb_hash_shift().
Definition at line 1082 of file hash.c.
References hash(), and rb_hash_size().
Referenced by rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_keep_if(), rb_hash_reject(), rb_hash_reject_bang(), rb_hash_select(), and rb_hash_select_bang().
Definition at line 1959 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(), RB_TYPE_P, recursive_eql(), RHASH, RHASH_IFNONE, RHASH_SIZE, T_HASH, and equal_data::tbl.
Referenced by rb_hash_eql(), and rb_hash_equal().
Definition at line 263 of file hash.c.
References hash_foreach_arg::arg, hash(), hash_foreach_iter(), Qnil, Qundef, rb_eRuntimeError, rb_raise(), RHASH, st_data_t, and st_foreach_check().
Referenced by rb_hash_foreach().
Definition at line 251 of file hash.c.
References FL_TEST, FL_UNSET, hash(), HASH_DELETED, Qundef, RHASH, RHASH_ITER_LEV, st_cleanup_safe(), and st_data_t.
Referenced by Init_Hash(), and rb_hash_foreach().
Definition at line 244 of file hash.c.
References hash(), and RHASH_ITER_LEV.
Referenced by Init_Hash().
Definition at line 219 of file hash.c.
References hash_foreach_arg::arg, FL_SET, HASH_DELETED, key, rb_eRuntimeError, rb_raise(), RHASH, ST_CHECK, ST_CONTINUE, ST_DELETE, and ST_STOP.
Referenced by hash_foreach_call().
Definition at line 2030 of file hash.c.
References key, rb_hash(), ST_CONTINUE, st_hash(), and val.
Referenced by rb_hash_hash().
Definition at line 344 of file hash.c.
References hash(), objhash, RHASH, and st_init_table().
Referenced by rb_hash_aset(), rb_hash_modify(), rb_hash_replace(), rb_hash_tbl(), and rb_hash_tbl_raw().
void Init_Hash | ( | void | ) |
Definition at line 3779 of file hash.c.
References empty_hash_alloc(), 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_foreach_ensure(), hash_foreach_ensure_rollback(), id_default, id_flatten_bang, id_hash, id_yield, origenviron, 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_initialize_copy(), 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_h(), rb_hash_to_hash(), rb_hash_update(), rb_hash_values(), rb_hash_values_at(), rb_include_module(), rb_intern, rb_mEnumerable, rb_obj_alloc(), and ruby_register_rollback_func_for_ensure().
Definition at line 1703 of file hash.c.
References hash(), inspect_i(), OBJ_INFECT, rb_hash_foreach(), rb_str_buf_cat2(), rb_str_buf_new2(), rb_usascii_str_new2, and recur.
Referenced by rb_hash_inspect().
Definition at line 1681 of file hash.c.
References key, OBJ_INFECT, rb_enc_copy(), rb_inspect(), rb_str_buf_append(), rb_str_buf_cat_ascii(), RSTRING_LEN, and ST_CONTINUE.
Referenced by inspect_hash().
|
static |
Definition at line 2740 of file hash.c.
References name, rb_sprintf(), and rb_syserr_fail_str().
Referenced by check_envname(), and ruby_setenv().
Definition at line 1261 of file hash.c.
References key, rb_yield_values(), RTEST, ST_CONTINUE, and ST_DELETE.
Referenced by rb_hash_keep_if(), and rb_hash_select_bang().
Definition at line 922 of file hash.c.
References key, rb_equal(), ST_CONTINUE, and ST_STOP.
Referenced by rb_hash_key().
Definition at line 1773 of file hash.c.
References key, rb_ary_push(), and ST_CONTINUE.
Referenced by rb_hash_keys().
Definition at line 2266 of file hash.c.
References Qundef, and rb_hash_lookup2().
Referenced by rb_hash_assoc().
|
static |
Definition at line 374 of file hash.c.
References rb_eRuntimeError, and rb_raise().
Referenced by rb_hash_aset().
NOINSERT_UPDATE_CALLBACK | ( | hash_aset | ) |
NOINSERT_UPDATE_CALLBACK | ( | hash_aset_str | ) |
NOINSERT_UPDATE_CALLBACK | ( | rb_hash_update_callback | ) |
NOINSERT_UPDATE_CALLBACK | ( | rb_hash_update_block_callback | ) |
NOINSERT_UPDATE_CALLBACK | ( | rb_hash_update_func_callback | ) |
NORETURN | ( | static void | no_new_keyvoid | ) |
NORETURN | ( | static void | invalid_envnameconst char *name | ) |
|
static |
Definition at line 2670 of file hash.c.
References path_tainted, and rb_path_check().
Referenced by env_aset(), env_path_tainted(), and rb_env_path_tainted().
Definition at line 2345 of file hash.c.
References key, rb_assoc_new(), rb_equal(), RTEST, ST_CONTINUE, ST_STOP, and val.
Referenced by rb_hash_rassoc().
|
static |
Definition at line 129 of file hash.c.
References BUILTIN_TYPE, FIX2LONG, FLONUM_P, Qundef, rb_dbl_hash(), rb_float_value, rb_hash(), rb_objid_hash(), rb_str_hash(), SPECIAL_CONST_P, T_FLOAT, and T_STRING.
Referenced by rb_objid_hash().
Definition at line 597 of file hash.c.
References hash(), rb_check_convert_type(), and T_HASH.
Referenced by get_hash(), rawmode_opt(), rb_econv_prepare_options(), rb_exec_getargs(), rb_Hash(), rb_hash_s_try_convert(), rb_io_s_popen(), rb_scan_args(), rb_str_sub_bang(), str_gsub(), and vm_callee_setup_keyword_arg().
VALUE rb_env_clear | ( | void | ) |
Definition at line 3225 of file hash.c.
References env_delete(), env_keys(), envtbl, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_f_getenv(), and val.
Referenced by Init_Hash(), and rb_execarg_run_options().
int rb_env_path_tainted | ( | void | ) |
Definition at line 2685 of file hash.c.
References getenv, PATH_ENV, path_tainted, and path_tainted_p().
Referenced by security().
Definition at line 2937 of file hash.c.
References cnt, env, environ, FREE_ENVIRON, GET_ENVIRON, LONG2FIX, and strchr().
Referenced by env_delete_if(), env_each_key(), env_each_pair(), env_each_value(), env_keep_if(), env_reject_bang(), env_select(), and env_select_bang().
Definition at line 2595 of file hash.c.
References env, env_path_tainted(), env_str_new2(), ENVMATCH, getenv, name, PATH_ENV, Qnil, rb_eArgError, rb_filesystem_encoding(), rb_filesystem_str_new_cstr(), rb_obj_freeze(), rb_raise(), rb_str_conv_enc(), rb_str_new(), rb_utf8_encoding(), RSTRING_LEN, RSTRING_PTR, SafeStringValue, and strlen().
Referenced by env_reject_bang(), env_select(), env_select_bang(), env_update_i(), env_values_at(), Init_Hash(), and rb_env_clear().
Definition at line 106 of file hash.c.
References CHAR_BIT, FIXNUM_P, hash_recursive(), INTEGER_PACK_NATIVE_BYTE_ORDER, LONG2FIX, rb_exec_recursive_outer(), rb_integer_pack(), rb_to_int(), RB_TYPE_P, and T_BIGNUM.
Referenced by cdhash_hash(), hash_i(), nucomp_hash(), nurat_hash(), range_hash(), rb_any_hash(), rb_ary_hash(), rb_struct_hash(), and time_hash().
Definition at line 706 of file hash.c.
References hash(), hash_default_value(), key, RHASH, st_data_t, st_lookup(), and val.
Referenced by cbsubst_get_subst_arg(), cbsubst_scan_args(), cbsubst_sym_to_subst(), cParser_initialize(), cState_configure(), cto_i(), dump_output(), econv_opts(), econv_primitive_convert(), extract_binmode(), generate_json_object(), group_by_i(), hash2ptr_dispparams(), hash2result(), Init_Hash(), io_read_nonblock(), io_s_write(), iseq_build_from_ary_body(), JSON_parse_object(), mString_Extend_json_create(), open_key_args(), ossl_ssl_read_internal(), ossl_ssl_write_nonblock(), parse_main(), pruby_get_instance(), rawmode_opt(), rb_econv_open_opts(), rb_econv_prepare_options(), rb_hash_values_at(), rb_io_extract_modeenc(), rb_io_initialize(), rb_io_write_nonblock(), rb_str_sub_bang(), rb_thread_variable_get(), rb_threadptr_pending_interrupt_check_mask(), realpath_rec(), recursive_list_access(), str_gsub(), str_transcode0(), strio_read_nonblock(), tk_do_callback(), tr_setup_table(), transcode_loop(), and zstream_run().
Definition at line 1402 of file hash.c.
References hash(), hash_aset(), hash_aset_str(), hash_tbl(), identhash, key, no_new_key(), rb_cString, rb_hash_modify(), rb_obj_class(), RHASH, RHASH_ITER_LEV, RHASH_UPDATE_ITER, st_table::type, and val.
Referenced by add_activated_refinement(), ary_add_hash(), ary_add_hash_by(), cbsubst_table_setup(), cdhash_set_label_i(), check_exec_fds(), check_exec_fds_1(), check_exec_options_i_extract(), collect_values_of_values(), core_hash_merge(), count_nodes(), count_objects(), count_objects_size(), coverage(), coverage_result_i(), create_encoding_table_core(), cState_to_h(), cto_i(), date_zone_to_diff(), debug_lines(), enum_to_h_i(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_profile_record_get(), group_by_i(), Init_GC(), Init_Hash(), Init_ossl_asn1(), Init_ossl_x509name(), io_s_write(), iseq_data_to_ary(), JSON_parse_object(), 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(), pruby_register_instance(), r_object0(), rb_ary_to_h(), rb_econv_prepare_options(), rb_enc_aliases_enc_i(), rb_hash_invert_i(), rb_hash_s_create(), rb_inflate_add_dictionary(), rb_mod_refine(), rb_struct_to_h(), rb_thread_variable_set(), rb_uninterruptible(), rb_using_refinement(), rb_vm_add_root_module(), reachable_object_from_root_i(), realpath_rec(), recursive_list_access(), recursive_push(), reg_named_captures_iter(), reject_i(), replace_i(), ripper_init_eventids1_table(), ripper_init_eventids2_table(), select_i(), separate_symbol(), set_state_ivars(), set_zero(), set_zero_i(), sig_list(), tk_install_cmd_core(), to_strkey(), tr_setup_table(), tr_trans(), update_encoding_table(), and when_vals().
Definition at line 2312 of file hash.c.
References assoc_cmp(), assoc_i(), st_hash_type::compare, hash(), st_hash_type::hash, reset_hash_type_arg::hash, identhash, key, lookup2_call(), reset_hash_type_arg::orighash, Qnil, Qundef, rb_assoc_new(), rb_ensure(), rb_hash_foreach(), reset_hash_type(), RHASH, RHASH_EMPTY_P, and st_table::type.
Referenced by Init_Hash().
Definition at line 1333 of file hash.c.
References clear_i(), hash(), rb_hash_foreach(), rb_hash_modify_check(), RHASH, RHASH_ITER_LEV, and st_clear().
Referenced by Init_Hash(), and rb_hash_replace().
Definition at line 2454 of file hash.c.
References hash(), identhash, rb_hash_compare_by_id_p(), rb_hash_modify(), rb_hash_rehash(), and RHASH.
Referenced by Init_Hash().
Definition at line 2473 of file hash.c.
References hash(), identhash, Qfalse, Qtrue, and RHASH.
Referenced by Init_Hash(), and rb_hash_compare_by_id().
Definition at line 818 of file hash.c.
References argc, argv, FL_TEST, hash(), HASH_PROC_DEFAULT, id_yield, key, Qnil, rb_funcall(), rb_scan_args(), and RHASH_IFNONE.
Referenced by Init_Hash().
Definition at line 876 of file hash.c.
References FL_TEST, hash(), HASH_PROC_DEFAULT, Qnil, and RHASH_IFNONE.
Referenced by Init_Hash().
Definition at line 1005 of file hash.c.
References hash(), key, Qnil, Qundef, rb_block_given_p(), rb_hash_delete_key(), rb_hash_modify_check(), rb_yield(), and val.
Referenced by Init_Hash(), pruby_unregister_instance(), recursive_pop(), and tk_uninstall_cmd().
Definition at line 1103 of file hash.c.
References delete_if_i(), hash(), hash_enum_size(), rb_hash_foreach(), rb_hash_modify_check(), RETURN_SIZED_ENUMERATOR, and RHASH.
Referenced by env_reject(), fdbm_reject(), fgdbm_reject(), fsdbm_reject(), and Init_Hash().
Definition at line 969 of file hash.c.
References FL_SET, hash(), HASH_DELETED, key, Qundef, RHASH, RHASH_ITER_LEV, st_data_t, st_delete(), st_delete_safe(), and val.
Referenced by rb_hash_delete(), and rb_hash_shift().
Definition at line 329 of file hash.c.
References hash(), rb_hash_dup_empty(), RHASH, RHASH_EMPTY_P, and st_copy().
Referenced by io_s_write(), and rb_using_refinement().
Definition at line 313 of file hash.c.
References FL_EXIVAR, FL_SET, FL_TAINT, FL_TEST, hash(), HASH_PROC_DEFAULT, NEWOBJ_OF, rb_copy_generic_ivar(), rb_obj_class(), RBASIC, RHASH_IFNONE, RHASH_SET_IFNONE, and T_MASK.
Referenced by rb_hash_dup(), and rb_hash_reject().
Definition at line 1596 of file hash.c.
References each_key_i(), hash(), hash_enum_size(), rb_hash_foreach(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1640 of file hash.c.
References each_pair_i(), each_pair_i_fast(), hash(), hash_enum_size(), rb_block_arity(), rb_hash_foreach(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1563 of file hash.c.
References each_value_i(), hash(), hash_enum_size(), rb_hash_foreach(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1531 of file hash.c.
References hash(), Qfalse, Qtrue, and RHASH_EMPTY_P.
Referenced by Init_Hash().
Definition at line 2024 of file hash.c.
References hash_equal(), and TRUE.
Referenced by Init_Hash().
Definition at line 2010 of file hash.c.
References FALSE, and hash_equal().
Referenced by Init_Hash().
Definition at line 791 of file hash.c.
References hash(), key, and rb_hash_fetch_m().
Definition at line 763 of file hash.c.
References argc, argv, hash(), key, NIL_P, PRIsVALUE, 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, st_data_t, st_lookup(), and val.
Referenced by Init_Hash(), and rb_hash_fetch().
Definition at line 2409 of file hash.c.
References argc, argv, flatten_i(), hash(), id_flatten_bang, INT2FIX, level, NUM2INT, rb_ary_new_capa(), rb_funcall2, rb_hash_foreach(), rb_hash_to_a(), and RHASH_SIZE.
Referenced by Init_Hash().
Definition at line 273 of file hash.c.
References hash_foreach_arg::arg, func, hash(), hash_foreach_call(), hash_foreach_ensure(), rb_ensure(), RHASH, and RHASH_ITER_LEV.
Referenced by cbsubst_def_attr_aliases(), core_hash_merge_kwd(), env_replace(), env_update(), initialize(), inspect_hash(), iseq_data_to_ary(), iseq_set_sequence(), JSON_parse_string(), rb_hash_assoc(), rb_hash_clear(), rb_hash_delete_if(), rb_hash_each_key(), rb_hash_each_pair(), rb_hash_each_value(), rb_hash_flatten(), rb_hash_has_value(), rb_hash_hash(), rb_hash_invert(), rb_hash_keep_if(), rb_hash_key(), rb_hash_keys(), rb_hash_rassoc(), rb_hash_rehash(), rb_hash_reject(), rb_hash_reject_bang(), rb_hash_replace(), rb_hash_select(), rb_hash_select_bang(), rb_hash_shift(), rb_hash_to_a(), rb_hash_update(), rb_hash_update_by(), rb_hash_values(), rb_thread_s_handle_interrupt(), rb_thread_variables(), reachable_objects_from_root(), recursive_eql(), using_module_recursive(), and w_object().
Definition at line 62 of file hash.c.
References hash(), and rb_obj_freeze().
Referenced by rb_coverage_result(), and rb_econv_prepare_options().
Definition at line 1876 of file hash.c.
References hash(), key, Qfalse, Qtrue, RHASH, and st_lookup().
Referenced by Init_Hash().
Definition at line 1912 of file hash.c.
References hash(), Qfalse, rb_hash_foreach(), rb_hash_search_value(), and val.
Referenced by Init_Hash().
Definition at line 2050 of file hash.c.
References hash(), hash_i(), INT2FIX, rb_hash_end(), rb_hash_foreach(), rb_hash_start(), rb_hash_uint(), RHASH_SIZE, and size.
Referenced by Init_Hash().
Definition at line 962 of file hash.c.
References hash(), rb_hash_key(), and rb_warn().
Referenced by Init_Hash().
Definition at line 485 of file hash.c.
References argc, argv, default_proc_arity_check(), FL_SET, hash(), HASH_PROC_DEFAULT, rb_block_given_p(), rb_block_proc(), rb_check_arity, rb_hash_modify(), rb_scan_args(), and RHASH_SET_IFNONE.
Referenced by Init_Hash().
Definition at line 1431 of file hash.c.
References Check_Type, FL_SET, FL_TEST, FL_UNSET, hash(), HASH_PROC_DEFAULT, st_table::num_entries, rb_hash_modify_check(), rb_hash_rehash(), RHASH, RHASH_IFNONE, RHASH_SET_IFNONE, st_clear(), st_copy(), st_free_table(), T_HASH, and to_hash().
Referenced by Init_Hash().
Definition at line 1728 of file hash.c.
References hash(), inspect_hash(), rb_exec_recursive(), rb_usascii_str_new2, and RHASH_EMPTY_P.
Referenced by Init_Hash().
Definition at line 2082 of file hash.c.
References hash(), rb_hash_foreach(), rb_hash_invert_i(), and rb_hash_new().
Referenced by env_invert(), and Init_Hash().
Definition at line 2063 of file hash.c.
References hash(), key, rb_hash_aset(), and ST_CONTINUE.
Referenced by rb_hash_invert().
Definition at line 1306 of file hash.c.
References hash(), hash_enum_size(), keep_if_i(), rb_hash_foreach(), rb_hash_modify_check(), RETURN_SIZED_ENUMERATOR, and RHASH.
Referenced by Init_Hash().
Definition at line 948 of file hash.c.
References hash(), key_i(), Qnil, and rb_hash_foreach().
Referenced by Init_Hash(), and rb_hash_index().
Definition at line 1792 of file hash.c.
References hash(), keys_i(), OBJ_PROMOTED, Qundef, RARRAY_PTR_USE, rb_ary_new_capa(), rb_ary_set_len(), rb_gc_writebarrier_remember_promoted(), rb_hash_foreach(), RHASH, RHASH_SIZE, size, ST_DATA_COMPATIBLE_P, and st_keys_check().
Referenced by Init_Hash().
Definition at line 717 of file hash.c.
References hash(), key, RHASH, st_data_t, st_lookup(), and val.
Referenced by ary_add_hash(), ary_add_hash_by(), lookup2_call(), rb_hash_lookup(), rb_io_extract_encoding_option(), recursive_check(), recursive_pop(), and recursive_push().
Definition at line 2254 of file hash.c.
References rb_hash_update(), and rb_obj_dup().
Referenced by Init_Hash().
|
static |
Definition at line 366 of file hash.c.
References hash(), hash_tbl(), and rb_hash_modify_check().
Referenced by rb_hash_aset(), rb_hash_compare_by_id(), rb_hash_initialize(), rb_hash_reject_bang(), rb_hash_update(), and rb_hash_update_by().
|
static |
Definition at line 338 of file hash.c.
References hash(), and rb_check_frozen.
Referenced by rb_hash_clear(), rb_hash_delete(), rb_hash_delete_if(), rb_hash_initialize_copy(), rb_hash_keep_if(), rb_hash_modify(), rb_hash_rehash(), rb_hash_replace(), rb_hash_select_bang(), rb_hash_set_default(), rb_hash_set_default_proc(), and rb_hash_shift().
VALUE rb_hash_new | ( | void | ) |
Definition at line 307 of file hash.c.
References hash_alloc(), and rb_cHash.
Referenced by allocate_cbsubst_info(), ary_tmp_hash_new(), check_exec_fds(), check_exec_options_i_extract(), core_hash_from_ary(), count_nodes(), count_objects(), count_objects_size(), count_tdata_objects(), create_encoding_table_core(), cState_to_h(), date_s__strptime_internal(), date_zone_to_diff(), enum_group_by(), enum_to_h(), env_select(), env_to_hash(), fdbm_invert(), fdbm_to_hash(), fgdbm_invert(), fgdbm_to_hash(), fsdbm_invert(), fsdbm_to_hash(), gc_latest_gc_info(), gc_profile_record_get(), gc_stat(), hidden_identity_hash_new(), ident_hash_new(), Init_BareVM(), Init_GC(), Init_ossl_asn1(), Init_ossl_x509name(), Init_sizeof(), Init_tkutil(), Init_VM(), io_s_write(), iseq_compile_each(), iseq_data_to_ary(), JSON_parse_object(), make_compile_option_value(), mString_to_json_raw_object(), nil_to_h(), ole_const_load(), ossl_dh_get_params(), ossl_dsa_get_params(), ossl_rsa_get_params(), ossl_sslctx_get_session_cache_stats(), pruby_init(), r_object0(), rb_ary_to_h(), rb_coverage_result(), rb_coverage_start(), rb_econv_prepare_options(), rb_enc_aliases(), rb_execarg_fixup(), rb_Hash(), rb_hash_invert(), rb_hash_reject(), rb_hash_select(), rb_hash_to_h(), rb_inflate_s_allocate(), rb_realpath_internal(), rb_reg_named_captures(), rb_struct_to_h(), rb_uninterruptible(), reachable_object_from_root_i(), reachable_objects_from_root(), recursive_push(), ripper_init_eventids1_table(), ripper_init_eventids2_table(), ruby_thread_init(), separate_symbol(), sig_list(), tk_symbolkey2str(), tr_setup_table(), tr_trans(), vm_callee_setup_keyword_arg(), vm_default_params(), and vm_stat().
Definition at line 2370 of file hash.c.
References hash(), Qnil, rassoc_i(), and rb_hash_foreach().
Referenced by Init_Hash().
Definition at line 654 of file hash.c.
References hash(), hash_alloc(), rb_eRuntimeError, rb_hash_foreach(), rb_hash_modify_check(), rb_hash_rehash_i(), rb_raise(), RHASH, RHASH_ITER_LEV, st_free_table(), and st_init_table_with_size().
Referenced by Init_Hash(), rb_hash_compare_by_id(), and rb_hash_initialize_copy().
Definition at line 625 of file hash.c.
References key, ST_CONTINUE, st_data_t, and st_insert().
Referenced by rb_hash_rehash().
Definition at line 1159 of file hash.c.
References FL_EXIVAR, FL_TAINT, FL_TEST, HAS_EXTRA_STATES, hash(), hash_enum_size(), HASH_PROC_DEFAULT, NIL_P, PRIsVALUE, rb_hash_dup_empty(), rb_hash_foreach(), rb_hash_new(), rb_obj_instance_variables, rb_warn(), reject_i(), result, RETURN_SIZED_ENUMERATOR, RHASH_EMPTY_P, RHASH_IFNONE, RTEST, and ruby_verbose.
Referenced by Init_Hash().
Definition at line 1122 of file hash.c.
References delete_if_i(), hash(), hash_enum_size(), Qnil, rb_hash_foreach(), rb_hash_modify(), RETURN_SIZED_ENUMERATOR, RHASH, and RHASH_SIZE.
Referenced by Init_Hash().
Definition at line 1477 of file hash.c.
References FL_SET, FL_TEST, FL_UNSET, hash(), HASH_PROC_DEFAULT, hash_tbl(), rb_hash_clear(), rb_hash_foreach(), rb_hash_modify_check(), replace_i(), RHASH, RHASH_IFNONE, RHASH_SET_IFNONE, to_hash(), and st_table::type.
Referenced by Init_Hash().
Definition at line 526 of file hash.c.
References argc, argv, hash(), hash_alloc(), key, NIL_P, Qnil, RARRAY_AREF, RARRAY_LEN, rb_builtin_class_name(), rb_check_array_type(), rb_eArgError, rb_hash_aset(), rb_hash_s_try_convert(), rb_raise(), rb_warn(), RHASH, st_copy(), and val.
Referenced by Init_Hash().
Definition at line 614 of file hash.c.
References hash(), and rb_check_hash_type().
Referenced by Init_Hash(), and rb_hash_s_create().
Definition at line 1887 of file hash.c.
References Qtrue, rb_equal(), ST_CONTINUE, and ST_STOP.
Referenced by rb_hash_has_value().
Definition at line 1248 of file hash.c.
References hash(), hash_enum_size(), rb_hash_foreach(), rb_hash_new(), result, RETURN_SIZED_ENUMERATOR, RHASH_EMPTY_P, and select_i().
Referenced by Init_Hash().
Definition at line 1279 of file hash.c.
References hash(), hash_enum_size(), keep_if_i(), Qnil, rb_hash_foreach(), rb_hash_modify_check(), RETURN_SIZED_ENUMERATOR, and RHASH.
Referenced by Init_Hash().
Definition at line 852 of file hash.c.
References FL_UNSET, hash(), HASH_PROC_DEFAULT, rb_hash_modify_check(), and RHASH_SET_IFNONE.
Referenced by Init_Hash().
Definition at line 898 of file hash.c.
References default_proc_arity_check(), FL_SET, FL_UNSET, hash(), HASH_PROC_DEFAULT, NIL_P, rb_check_convert_type(), rb_eTypeError, rb_hash_modify_check(), rb_obj_classname(), rb_obj_is_proc(), rb_raise(), RHASH_SET_IFNONE, and T_DATA.
Referenced by Init_Hash().
Definition at line 73 of file hash.c.
References hash(), RB_OBJ_WRITE, and RHASH.
Definition at line 1047 of file hash.c.
References hash(), hash_default_value(), shift_var::key, Qnil, Qundef, rb_assoc_new(), rb_hash_delete_key(), rb_hash_foreach(), rb_hash_modify_check(), RHASH, RHASH_ITER_LEV, shift_i_safe(), st_shift(), and shift_var::val.
Referenced by Init_Hash().
Definition at line 1514 of file hash.c.
References hash(), INT2FIX, and RHASH_SIZE.
Referenced by hash_enum_size(), and Init_Hash().
Definition at line 353 of file hash.c.
References hash(), hash_tbl(), and OBJ_WB_UNPROTECT.
Referenced by collect_values_of_values().
Definition at line 360 of file hash.c.
References hash(), and hash_tbl().
Referenced by clear_coverage(), ident_hash_new(), iseq_compile_each(), rb_ary_and(), rb_ary_diff(), rb_ary_uniq_bang(), rb_check_exec_env(), rb_check_exec_options(), rb_execarg_extract_options(), rb_extract_keywords(), and unknown_keyword_error().
Definition at line 1669 of file hash.c.
References hash(), OBJ_INFECT, rb_ary_new_capa(), rb_hash_foreach(), RHASH_SIZE, and to_a_i().
Referenced by Init_Hash(), and rb_hash_flatten().
Definition at line 1757 of file hash.c.
References FL_SET, FL_TEST, hash(), HASH_PROC_DEFAULT, rb_cHash, rb_hash_new(), rb_obj_class(), RHASH, RHASH_EMPTY_P, RHASH_IFNONE, RHASH_SET_IFNONE, and st_copy().
Referenced by Init_Hash().
Definition at line 2165 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().
|
static |
Definition at line 2115 of file hash.c.
References update_arg::arg, if(), key, update_arg::new_key, update_arg::new_value, update_arg::old_value, rb_yield_values(), and ST_CONTINUE.
Referenced by rb_hash_update_block_i().
Definition at line 2135 of file hash.c.
References hash(), key, rb_hash_update_block_callback(), RHASH_UPDATE, and ST_CONTINUE.
Referenced by rb_hash_update().
VALUE rb_hash_update_by | ( | VALUE | hash1, |
VALUE | hash2, | ||
rb_hash_update_func * | func | ||
) |
Definition at line 2217 of file hash.c.
References func, update_func_arg::func, update_func_arg::hash, rb_hash_foreach(), rb_hash_modify(), rb_hash_update_func_i(), rb_hash_update_i(), and to_hash().
|
static |
Definition at line 2091 of file hash.c.
References update_arg::arg, key, update_arg::new_key, update_arg::new_value, update_arg::old_value, and ST_CONTINUE.
Referenced by rb_hash_update_i().
|
static |
Definition at line 2185 of file hash.c.
References update_arg::arg, update_func_arg::func, if(), key, update_arg::new_key, update_arg::new_value, update_arg::old_value, ST_CONTINUE, and update_func_arg::value.
Referenced by rb_hash_update_func_i().
Definition at line 2206 of file hash.c.
References hash(), update_func_arg::hash, key, rb_hash_update_func_callback(), RHASH_UPDATE, ST_CONTINUE, and update_func_arg::value.
Referenced by rb_hash_update_by().
Definition at line 2108 of file hash.c.
References hash(), key, rb_hash_update_callback(), RHASH_UPDATE, and ST_CONTINUE.
Referenced by rb_hash_update(), and rb_hash_update_by().
Definition at line 1836 of file hash.c.
References hash(), OBJ_PROMOTED, Qundef, RARRAY_PTR_USE, rb_ary_new_capa(), rb_ary_set_len(), rb_gc_writebarrier_remember_promoted(), rb_hash_foreach(), RHASH, RHASH_SIZE, size, ST_DATA_COMPATIBLE_P, st_values_check(), and values_i().
Referenced by Init_Hash(), rb_ary_or(), and rb_ary_uniq().
Definition at line 1213 of file hash.c.
References argc, argv, hash(), rb_ary_new2, rb_ary_push(), rb_hash_aref(), and result.
Referenced by Init_Hash().
long rb_objid_hash | ( | st_index_t | index | ) |
Definition at line 159 of file hash.c.
References rb_any_hash(), rb_hash_end(), rb_hash_start(), and rb_hash_uint().
Referenced by rb_any_hash(), and rb_obj_hash().
Definition at line 1946 of file hash.c.
References eql_i(), hash(), Qtrue, rb_hash_foreach(), recur, and equal_data::result.
Referenced by hash_equal().
Definition at line 1136 of file hash.c.
References key, rb_hash_aset(), rb_yield_values(), result, RTEST, and ST_CONTINUE.
Referenced by rb_hash_reject().
Definition at line 1422 of file hash.c.
References hash(), key, rb_hash_aset(), ST_CONTINUE, and val.
Referenced by rb_hash_replace().
Definition at line 2278 of file hash.c.
References reset_hash_type_arg::hash, reset_hash_type_arg::orighash, Qundef, and RHASH.
Referenced by rb_hash_assoc().
Definition at line 2756 of file hash.c.
References ALLOC_N, buf, check_envname(), environ, envix(), fail, free(), GET_ENVIRON, invalid_envname(), malloc, max(), name, origenviron, rb_sprintf(), rb_str_resize(), rb_sys_fail_str(), REALLOC_N, RSTRING_PTR, ruby_strdup(), setenv, snprintf, strlen(), unsetenv, and xfree().
Referenced by env_aset(), env_delete(), rb_execarg_run_options(), and ruby_unsetenv().
void ruby_unsetenv | ( | const char * | name | ) |
Definition at line 2865 of file hash.c.
References name, and ruby_setenv().
Definition at line 1225 of file hash.c.
References key, rb_hash_aset(), rb_yield_values(), result, RTEST, and ST_CONTINUE.
Referenced by rb_hash_select().
Definition at line 1024 of file hash.c.
References shift_var::key, key, ST_STOP, and shift_var::val.
Referenced by rb_hash_shift().
Definition at line 198 of file hash.c.
References foreach_safe_arg::arg, foreach_safe_i(), func, rb_eRuntimeError, rb_raise(), st_data_t, and st_foreach_check().
Referenced by cvar_list(), find_class_path(), givar_i(), mod_cvar_at(), 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_const_at(), and w_ivar().
|
static |
Definition at line 408 of file hash.c.
References update_arg::arg, func, hash(), key, Qundef, RB_OBJ_WRITTEN, result, RHASH, st_data_t, and st_update().
Definition at line 1651 of file hash.c.
References key, rb_ary_push(), rb_assoc_new(), and ST_CONTINUE.
Referenced by rb_hash_to_a().
Definition at line 591 of file hash.c.
References hash(), rb_convert_type(), and T_HASH.
Referenced by env_replace(), env_update(), rb_hash_initialize_copy(), rb_hash_replace(), rb_hash_update(), and rb_hash_update_by().
Definition at line 1817 of file hash.c.
References rb_ary_push(), and ST_CONTINUE.
Referenced by rb_hash_values().
char** environ |
Definition at line 6 of file missing-pips.c.
Referenced by env_each_pair(), env_empty_p(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_shift(), env_size(), env_to_a(), env_to_hash(), env_values(), envix(), Init_Hash(), rb_env_size(), and ruby_setenv().
|
static |
Definition at line 69 of file hash.c.
Referenced by env_delete_if(), env_keep_if(), env_reject_bang(), env_select_bang(), Init_Hash(), rb_env_clear(), and rb_execarg_fixup().
|
static |
Definition at line 70 of file hash.c.
Referenced by hash_default_value(), and Init_Hash().
|
static |
Definition at line 70 of file hash.c.
Referenced by Init_Hash(), and rb_hash_flatten().
|
static |
Definition at line 70 of file hash.c.
Referenced by hash_recursive(), and Init_Hash().
|
static |
Definition at line 70 of file hash.c.
Referenced by hash_default_value(), Init_Hash(), and rb_hash_default().
|
static |
|
static |
Definition at line 2485 of file hash.c.
Referenced by Init_Hash(), and ruby_setenv().
|
static |
Definition at line 2483 of file hash.c.
Referenced by env_aset(), env_delete(), env_path_tainted(), path_tainted_p(), and rb_env_path_tainted().
VALUE rb_cHash |
Definition at line 67 of file hash.c.
Referenced by cState_from_state_s(), generate_json(), has_extra_methods(), Init_Hash(), make_compile_option(), rb_hash_new(), rb_hash_to_h(), vm_redefinition_check_flag(), and w_object().
const struct st_hash_type st_hashtype_num |