Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cHash. More...
Go to the source code of this file.
Macros | |
#define | st_foreach_safe rb_st_foreach_safe |
Typedefs | |
typedef VALUE | rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value) |
Functions | |
void | rb_st_foreach_safe (struct st_table *, int(*)(st_data_t, st_data_t, st_data_t), st_data_t) |
VALUE | rb_check_hash_type (VALUE) |
void | rb_hash_foreach (VALUE, int(*)(VALUE, VALUE, VALUE), VALUE) |
VALUE | rb_hash (VALUE) |
VALUE | rb_hash_new (void) |
VALUE | rb_hash_dup (VALUE) |
VALUE | rb_hash_freeze (VALUE) |
VALUE | rb_hash_aref (VALUE, VALUE) |
VALUE | rb_hash_lookup (VALUE, VALUE) |
VALUE | rb_hash_lookup2 (VALUE, VALUE, VALUE) |
VALUE | rb_hash_fetch (VALUE, VALUE) |
VALUE | rb_hash_aset (VALUE, VALUE, VALUE) |
VALUE | rb_hash_clear (VALUE) |
VALUE | rb_hash_delete_if (VALUE) |
VALUE | rb_hash_delete (VALUE, VALUE) |
VALUE | rb_hash_set_ifnone (VALUE hash, VALUE ifnone) |
void | rb_hash_bulk_insert (long, const VALUE *, VALUE) |
VALUE | rb_hash_update_by (VALUE hash1, VALUE hash2, rb_hash_update_func *func) |
struct st_table * | rb_hash_tbl (VALUE, const char *file, int line) |
int | rb_path_check (const char *) |
int | rb_env_path_tainted (void) |
VALUE | rb_env_clear (void) |
VALUE | rb_hash_size (VALUE) |
void | rb_hash_free (VALUE) |
Public APIs related to rb_cHash.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file hash.h.
#define st_foreach_safe rb_st_foreach_safe |
Definition at line 1860 of file hash.c.
References update_arg::hash, rb_check_convert_type_with_id(), and T_HASH.
Referenced by rb_econv_prepare_options(), and rb_Hash().
VALUE rb_env_clear | ( | void | ) |
Definition at line 5839 of file hash.c.
References key, RARRAY_AREF, RARRAY_LEN, RB_GC_GUARD, RSTRING_PTR, ruby_setenv(), and TRUE.
Referenced by rb_execarg_run_options().
int rb_env_path_tainted | ( | void | ) |
Definition at line 5051 of file hash.c.
References rb_warn_deprecated_to_remove().
Definition at line 143 of file hash.c.
References FIXNUM_MAX, FIXNUM_MIN, FIXNUM_P, id_hash, INTEGER_PACK_NATIVE_BYTE_ORDER, LONG2FIX, Qundef, rb_check_funcall_basic_kw(), rb_exec_recursive_outer(), rb_integer_pack(), rb_mKernel, rb_to_int(), and T_BIGNUM.
Referenced by rb_complex_hash(), and rb_rational_hash().
Definition at line 2046 of file hash.c.
References key, and rb_hash_default_value().
Referenced by Init_Hash(), rb_autoload_str(), rb_econv_open_opts(), rb_econv_prepare_options(), rb_hash_values_at(), rb_io_extract_modeenc(), rb_iseq_build_from_ary(), rb_obj_dig(), and rb_warning_category_from_name().
Definition at line 2901 of file hash.c.
References identhash, key, rb_cString, rb_obj_class(), RHASH_ITER_LEV, RHASH_TYPE, RHASH_UPDATE_ITER, and shift_var::val.
Referenced by Init_Exception(), Init_GC(), Init_Hash(), Init_ossl_asn1(), Init_ossl_x509name(), InitVM_Enumerator(), olerecord_set_ivar(), rb_ast_add_mark_object(), rb_autoload_str(), rb_econv_prepare_options(), rb_hash_set_pair(), rb_iseq_new_top(), and rb_uninterruptible().
Definition at line 4777 of file hash.c.
References argc, argv, st_hash_type::hash, HASH_ASSERT, rb_hash_bulk_insert_into_st_table(), RHASH_AR_TABLE_MAX_SIZE, RHASH_AR_TABLE_SIZE, and RHASH_TBL_RAW.
Definition at line 2819 of file hash.c.
References rb_hash_foreach(), RHASH_ITER_LEV, and st_clear.
Referenced by Init_Hash(), and yyparse().
Definition at line 2490 of file hash.c.
References rb_hash_foreach(), and RETURN_SIZED_ENUMERATOR.
Referenced by Init_Hash().
Definition at line 1579 of file hash.c.
References FL_EXIVAR, hash_foreach_arg::hash, rb_copy_generic_ivar(), rb_obj_class(), RBASIC, and RHASH_PROC_DEFAULT.
Definition at line 2138 of file hash.c.
References key.
Referenced by rb_category_compile_warn(), rb_category_warn(), and rb_category_warning().
void rb_hash_free | ( | VALUE | ) |
Definition at line 101 of file hash.c.
References rb_obj_freeze().
Referenced by rb_econv_prepare_options().
Definition at line 2072 of file hash.c.
References key, Qnil, and rb_hash_lookup2().
Definition at line 2059 of file hash.c.
Referenced by rb_hash_lookup(), rb_io_extract_encoding_option(), and rb_str_format().
VALUE rb_hash_new | ( | void | ) |
Definition at line 1538 of file hash.c.
References rb_cHash.
Referenced by date__httpdate(), date__iso8601(), date__jisx0301(), date__parse(), date__rfc2822(), date__rfc3339(), date__xmlschema(), Init_GC(), Init_limits(), Init_ossl_asn1(), Init_ossl_x509name(), Init_sizeof(), olerecord_set_ivar(), rb_default_coverage(), rb_econv_prepare_options(), rb_Hash(), rb_hash_new_with_size(), rb_hash_reject(), rb_ident_hash_new(), and yyparse().
Definition at line 113 of file hash.c.
References RB_OBJ_WRITE, and RHASH.
Definition at line 2981 of file hash.c.
References INT2FIX, and RHASH_SIZE.
Referenced by Init_Hash().
Definition at line 1609 of file hash.c.
References OBJ_WB_UNPROTECT, and rb_hash_tbl_raw().
VALUE rb_hash_update_by | ( | VALUE | hash1, |
VALUE | hash2, | ||
rb_hash_update_func * | func | ||
) |
Definition at line 4036 of file hash.c.
References update_func_arg::func, update_func_arg::hash, rb_hash_foreach(), and to_hash.
Definition at line 6250 of file file.c.
References PATH_SEP_CHAR, rb_str_new, strchr(), and strlen().