|
Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "internal.h"#include "ruby/st.h"#include "ruby/util.h"#include <errno.h>#include "probes.h"#include "id.h"#include "symbol.h"#include "gc.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 | SET_DEFAULT(hash, ifnone) |
| #define | SET_PROC_DEFAULT(hash, proc) set_proc_default(hash, proc) |
| #define | COPY_DEFAULT(hash, hash2) copy_default(RHASH(hash), RHASH(hash2)) |
| #define | rb_ident_cmp st_numcmp |
| #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 | get_env_ptr(var, val) (var = get_env_cstr(val, #var)) |
| #define | env_name(s) env_name(&(s)) |
| #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) |
| typedef int(* | tbl_update_func) (st_data_t *, st_data_t *, st_data_t, int) |
Variables | |
| VALUE | rb_cHash |
| char ** | environ |
| #define ENVNMATCH | ( | s1, | |
| s2, | |||
| n | |||
| ) | (memcmp((s1), (s2), (n)) == 0) |
| #define GET_ENVIRON | ( | e | ) | (e) |
Definition at line 3192 of file hash.c.
Referenced by ruby_setenv().
| #define HAS_EXTRA_STATES | ( | hash, | |
| klass | |||
| ) |
| #define NOINSERT_UPDATE_CALLBACK | ( | func | ) |
| #define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by Init_Hash().
| #define RHASH_UPDATE | ( | hash, | |
| key, | |||
| func, | |||
| arg | |||
| ) | RHASH_UPDATE_ITER(hash, RHASH_ITER_LEV(hash), key, func, arg) |
| #define RHASH_UPDATE_ITER | ( | h, | |
| iter_lev, | |||
| key, | |||
| func, | |||
| a | |||
| ) |
| #define SET_DEFAULT | ( | hash, | |
| ifnone | |||
| ) |
| #define SET_PROC_DEFAULT | ( | hash, | |
| proc | |||
| ) | set_proc_default(hash, proc) |
| #define UPDATE_CALLBACK | ( | iter_lev, | |
| func | |||
| ) | ((iter_lev) > 0 ? func##_noinsert : func##_insert) |
| void Init_Hash | ( | void | ) |
| NORETURN | ( | static void | no_new_keyvoid | ) |
Definition at line 722 of file hash.c.
References rb_check_convert_type_with_id(), and T_HASH.
Referenced by rb_Hash(), and rb_scan_args().
| long rb_dbl_long_hash | ( | double | d | ) |
Definition at line 144 of file hash.c.
References rb_hash_start(), rb_memhash(), and rb_objid_hash().
Referenced by rb_dbl_hash().
Definition at line 121 of file hash.c.
References hval, and rb_exec_recursive_outer().
Definition at line 3150 of file hash.c.
References rb_hash_tbl_raw().
Definition at line 831 of file hash.c.
References rb_hash_default_value(), RHASH, st_lookup, and val.
Referenced by pruby_get_instance(), rb_econv_open_opts(), rb_hash_dig(), rb_hash_values_at(), and rb_iseq_build_from_ary().
Definition at line 1616 of file hash.c.
References RHASH, and RHASH_ITER_LEV.
Referenced by pruby_register_instance(), rb_uninterruptible(), and rb_vm_add_root_module().
Definition at line 2689 of file hash.c.
References st_hash_type::compare, Qnil, RHASH, RHASH_EMPTY_P, st_table::type, and rb_thread_struct::value.
Definition at line 803 of file hash.c.
References CLASS_OF, and rb_method_basic_definition_p().
Referenced by rb_hash_aref().
Definition at line 1119 of file hash.c.
References Qnil, Qundef, and rb_hash_delete_entry().
Referenced by pruby_unregister_instance().
Definition at line 1253 of file hash.c.
References RETURN_SIZED_ENUMERATOR.
Definition at line 3009 of file hash.c.
References argv, Qnil, rb_check_arity, rb_hash_aref(), rb_obj_dig(), and UNLIMITED_ARGUMENTS.
Definition at line 917 of file hash.c.
Referenced by rb_hash_fetch_values().
Definition at line 1399 of file hash.c.
References argc, rb_ary_new2, rb_ary_push(), and rb_hash_fetch().
Definition at line 385 of file hash.c.
References hash_foreach_arg::hash, RHASH, and RHASH_ITER_LEV.
Referenced by rb_hash_keys(), rb_hash_rassoc(), and rb_hash_values().
Definition at line 1492 of file hash.c.
References RETURN_SIZED_ENUMERATOR.
Definition at line 2131 of file hash.c.
References RARRAY_PTR_USE, rb_ary_new_capa(), rb_ary_set_len(), rb_gc_writebarrier_remember(), rb_hash_foreach(), RHASH, RHASH_SIZE, size, ST_DATA_COMPATIBLE_P, and st_keys().
Definition at line 853 of file hash.c.
References Qnil, and rb_hash_lookup2().
Definition at line 842 of file hash.c.
References RHASH, st_lookup, and val.
Referenced by rb_hash_lookup(), and rb_io_extract_encoding_option().
| VALUE rb_hash_new | ( | void | ) |
Definition at line 424 of file hash.c.
Referenced by Init_limits(), Init_sizeof(), Init_vm_objects(), rb_Hash(), rb_hash_new_with_size(), and rb_ident_hash_new().
| VALUE rb_hash_new_with_size | ( | st_index_t | size | ) |
Definition at line 430 of file hash.c.
References rb_hash_new(), RHASH, and st_init_table_with_size.
Referenced by rb_hash_bulk_insert().
Definition at line 2747 of file hash.c.
References Qnil, and rb_hash_foreach().
Definition at line 779 of file hash.c.
References rb_eRuntimeError, rb_raise(), and RHASH_ITER_LEV.
Definition at line 1272 of file hash.c.
References RETURN_SIZED_ENUMERATOR.
Definition at line 1465 of file hash.c.
References RETURN_SIZED_ENUMERATOR.
Definition at line 1718 of file hash.c.
References INT2FIX, and RHASH_SIZE.
Definition at line 475 of file hash.c.
References OBJ_WB_UNPROTECT.
Definition at line 482 of file hash.c.
Referenced by rb_execarg_extract_options(), rb_hash_add_new_element(), and rb_reset_coverages().
| VALUE rb_hash_update_by | ( | VALUE | hash1, |
| VALUE | hash2, | ||
| rb_hash_update_func * | func | ||
| ) |
Definition at line 2175 of file hash.c.
References RARRAY_PTR_USE, rb_ary_new_capa(), rb_ary_set_len(), rb_gc_writebarrier_remember(), rb_hash_foreach(), RHASH, RHASH_SIZE, size, ST_DATA_COMPATIBLE_P, and st_values().
Definition at line 1371 of file hash.c.
References argc, rb_ary_new2, rb_ary_push(), and rb_hash_aref().
| VALUE rb_ident_hash_new | ( | void | ) |
Definition at line 2924 of file hash.c.
References rb_hash_new(), RHASH, and st_init_table.
Referenced by Init_sym(), and rb_uninterruptible().
| st_table* rb_init_identtable | ( | void | ) |
Definition at line 2932 of file hash.c.
References st_init_table.
| st_table* rb_init_identtable_with_size | ( | st_index_t | size | ) |
Definition at line 2938 of file hash.c.
References st_init_table_with_size.
| long rb_objid_hash | ( | st_index_t | index | ) |
Definition at line 246 of file hash.c.
Referenced by rb_dbl_long_hash().
Definition at line 3497 of file hash.c.
References ALLOCV_END, ALLOCV_N, buf, fail, free(), GET_ENVIRON, len, malloc, NULL, PRIuSIZE, rb_sprintf(), rb_sys_fail_str(), snprintf, and strlen().
Referenced by ruby_unsetenv().
| void ruby_unsetenv | ( | const char * | name | ) |
Definition at line 3641 of file hash.c.
References ruby_setenv().
Definition at line 316 of file hash.c.
References foreach_safe_arg::arg, foreach_safe_arg::func, st_foreach_check(), and foreach_safe_arg::tbl.
Referenced by rb_const_list().
| char** environ |
Referenced by compat_init_setproctitle().
1.8.13