23 # ifdef HAVE_CRT_EXTERNS_H
30 #define HAS_EXTRA_STATES(hash, klass) ( \
31 ((klass = has_extra_methods(rb_obj_class(hash))) != 0) || \
32 FL_TEST((hash), FL_EXIVAR|FL_TAINT|HASH_PROC_DEFAULT) || \
33 !NIL_P(RHASH_IFNONE(hash)))
34 #define HASH_REJECT_COPY_EXTRA_STATES 1
101 if (recurse)
return INT2FIX(0);
116 ul &= (1UL << (
sizeof(long)*
CHAR_BIT-1)) - 1;
135 if (a ==
Qundef)
return 0;
173 #define identhash st_hashtype_num
190 status = (*arg->
func)(key, value, arg->
arg);
277 if (!
RHASH(hash)->ntbl)
346 if (!
RHASH(hash)->ntbl) {
349 return RHASH(hash)->ntbl;
384 #define NOINSERT_UPDATE_CALLBACK(func) \
386 func##_noinsert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \
388 if (!existing) no_new_key(); \
389 return func(key, val, (struct update_arg *)arg, existing); \
393 func##_insert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \
395 return func(key, val, (struct update_arg *)arg, existing); \
413 arg.
arg = optional_arg;
424 if (arg.new_value)
RB_OBJ_WRITTEN(hash, arg.old_value, arg.new_value);
429 #define UPDATE_CALLBACK(iter_lev, func) ((iter_lev) > 0 ? func##_noinsert : func##_insert)
431 #define RHASH_UPDATE_ITER(h, iter_lev, key, func, a) do { \
432 tbl_update((h), (key), UPDATE_CALLBACK((iter_lev), func), (st_data_t)(a)); \
435 #define RHASH_UPDATE(hash, key, func, arg) \
436 RHASH_UPDATE_ITER(hash, RHASH_ITER_LEV(hash), key, func, arg)
535 if (
RHASH(tmp)->ntbl) {
557 rb_warn(
"wrong element type %s at %ld (expected array)",
559 rb_warn(
"ignoring wrong elements is deprecated, remove them explicitly");
560 rb_warn(
"this causes ArgumentError in the next release");
583 for (i=0; i<
argc; i+=2) {
663 if (!
RHASH(hash)->ntbl)
672 RHASH(tmp)->ntbl = 0;
772 if (block_given && argc == 2) {
773 rb_warn(
"block supersedes default value argument");
776 if (block_given)
return rb_yield(key);
825 if (argc == 0)
return Qnil;
911 "wrong default_proc type %s (expected Proc)",
964 rb_warn(
"Hash#index is deprecated; use Hash#key");
973 if (!
RHASH(hash)->ntbl)
1052 if (
RHASH(hash)->ntbl) {
1107 if (
RHASH(hash)->ntbl)
1129 if (!n)
return Qnil;
1131 if (n ==
RHASH(hash)->ntbl->num_entries)
return Qnil;
1167 #if HASH_REJECT_COPY_EXTRA_STATES
1169 rb_warn(
"following states will not be copied in the future version:");
1190 #if HASH_REJECT_COPY_EXTRA_STATES
1218 for (i=0; i<
argc; i++) {
1285 if (!
RHASH(hash)->ntbl)
1287 n =
RHASH(hash)->ntbl->num_entries;
1289 if (n ==
RHASH(hash)->ntbl->num_entries)
return Qnil;
1310 if (
RHASH(hash)->ntbl)
1336 if (!
RHASH(hash)->ntbl)
1338 if (
RHASH(hash)->ntbl->num_entries > 0) {
1369 return hash_aset(key, val, arg, existing);
1440 if (hash == hash2)
return hash;
1442 ntbl =
RHASH(hash)->ntbl;
1443 if (
RHASH(hash2)->ntbl) {
1482 if (hash == hash2)
return hash;
1491 table2 =
RHASH(hash2)->ntbl;
1798 if (size == 0)
return keys;
1842 if (size == 0)
return values;
1878 if (!
RHASH(hash)->ntbl)
1950 if (recur)
return Qtrue;
1963 if (hash1 == hash2)
return Qtrue;
1969 return rb_eql(hash2, hash1);
1975 if (!
RHASH(hash1)->ntbl || !
RHASH(hash2)->ntbl)
1977 if (
RHASH(hash1)->ntbl->type !=
RHASH(hash2)->ntbl->type)
2037 *hval ^=
st_hash(hdata,
sizeof(hdata), 0);
2319 table =
RHASH(hash)->ntbl;
2320 orighash = table->
type;
2329 table->
type = &assochash;
2419 if (level - 1 > 0) {
2423 else if (level < 0) {
2475 if (!
RHASH(hash)->ntbl)
2487 #define GET_ENVIRON(e) ((e) = rb_w32_get_environ())
2488 #define FREE_ENVIRON(e) rb_w32_free_environ(e)
2489 static char **my_environ;
2491 #define environ my_environ
2493 static inline char *
2496 static int binary = -1;
2497 static int locale = -1;
2504 #define getenv(n) w32_getenv(n)
2505 #elif defined(__APPLE__)
2507 #define environ (*_NSGetEnviron())
2508 #define GET_ENVIRON(e) (e)
2509 #define FREE_ENVIRON(e)
2512 #define GET_ENVIRON(e) (e)
2513 #define FREE_ENVIRON(e)
2515 #ifdef ENV_IGNORECASE
2516 #define ENVMATCH(s1, s2) (STRCASECMP((s1), (s2)) == 0)
2517 #define ENVNMATCH(s1, s2, n) (STRNCASECMP((s1), (s2), (n)) == 0)
2519 #define ENVMATCH(n1, n2) (strcmp((n1), (n2)) == 0)
2520 #define ENVNMATCH(s1, s2, n) (memcmp((s1), (s2), (n)) == 0)
2539 if (!ptr)
return Qnil;
2644 if (block_given && argc == 2) {
2645 rb_warn(
"block supersedes default value argument");
2654 if (block_given)
return rb_yield(key);
2678 if (path_tainted < 0) {
2687 if (path_tainted < 0) {
2693 #if defined(_WIN32) || (defined(HAVE_SETENV) && defined(HAVE_UNSETENV))
2696 in_origenv(
const char *
str)
2699 for (env = origenviron; *
env; ++
env) {
2700 if (*env == str)
return 1;
2712 for (i = 0; env[
i]; i++) {
2713 if (
ENVNMATCH(env[i],nam,len) && env[i][len] ==
'=')
2723 getenvsize(
const char*
p)
2725 const char* porg =
p;
2726 while (*p++) p +=
strlen(p) + 1;
2727 return p - porg + 1;
2736 #if !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV)
2763 char* p = GetEnvironmentStringsA();
2767 FreeEnvironmentStringsA(p);
2768 if (n >= getenvblocksize()) {
2780 if (!value || !*value) {
2782 if (!SetEnvironmentVariable(name, value) &&
2783 GetLastError() != ERROR_ENVVAR_NOT_FOUND)
goto fail;
2789 #elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
2793 if (
setenv(name, value, 1))
2797 #ifdef VOID_UNSETENV
2806 char **env_ptr, *
str;
2809 for (env_ptr =
GET_ENVIRON(environ); (str = *env_ptr) != 0; ++env_ptr) {
2810 if (!strncmp(str, name, len) && str[
len] ==
'=') {
2811 if (!in_origenv(str))
free(str);
2812 while ((env_ptr[0] = env_ptr[1]) != 0) env_ptr++;
2818 snprintf(str, len,
"%s=%s", name, value);
2828 if (environ == origenviron) {
2833 for (max = i; environ[
max]; max++) ;
2834 tmpenv =
ALLOC_N(
char*, max+2);
2835 for (j=0; j<
max; j++)
2842 while (*envp && *envp != environ[i]) envp++;
2846 while (environ[i]) {
2847 environ[
i] = environ[i+1];
2860 snprintf(environ[i],len,
"%s=%s",name,value);
3097 if (del == 0)
return Qnil;
3132 for (i=0; i<
argc; i++) {
3197 if (del == 0)
return Qnil;
3269 if (env != environ) {
3344 for (i=0; env[
i]; i++)
3516 rb_warn(
"ENV.index is deprecated; use ENV.key");
3626 if (env == hash)
return env;
3659 if (env == hash)
return env;
3782 #define rb_intern(str) rb_intern_const(str)
#define RB_TYPE_P(obj, type)
#define RHASH_UPDATE(hash, key, func, arg)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
static VALUE empty_hash_alloc(VALUE klass)
#define ST_DATA_COMPATIBLE_P(type)
const char * rb_builtin_class_name(VALUE x)
static VALUE hash_foreach_call(VALUE arg)
static int rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
static int each_pair_i(VALUE key, VALUE value)
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
VALUE rb_str_ellipsize(VALUE, long)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
rb_funcall2(argv[0], id_yield, argc-1, argv+1)
st_table * st_init_table_with_size(const struct st_hash_type *, st_index_t)
#define RB_OBJ_WRITTEN(a, oldv, b)
static VALUE env_each_value(VALUE ehash)
VALUE rb_ary_new_capa(long capa)
char * rb_w32_ugetenv(const char *)
#define RB_OBJ_WRITE(a, slot, b)
void rb_enc_copy(VALUE obj1, VALUE obj2)
static VALUE rb_hash_each_value(VALUE hash)
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
static VALUE env_delete_m(VALUE obj, VALUE name)
size_t strlen(const char *)
static VALUE rb_hash_has_value(VALUE hash, VALUE val)
const char * rb_obj_classname(VALUE)
VALUE rb_str_buf_cat_ascii(VALUE, const char *)
static void invalid_envname(const char *name)
static void path_tainted_p(const char *path)
static int replace_i(VALUE key, VALUE val, VALUE hash)
#define rb_tainted_str_new2
static VALUE rb_hash_s_try_convert(VALUE, VALUE)
static int envix(const char *nam)
static int max(int a, int b)
int st_lookup(st_table *, st_data_t, st_data_t *)
static int keep_if_i(VALUE key, VALUE value, VALUE hash)
static void no_new_key(void)
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
VALUE rb_str_buf_append(VALUE, VALUE)
static int env_update_i(VALUE key, VALUE val)
int st_shift(st_table *, st_data_t *, st_data_t *)
static VALUE rb_hash_size(VALUE hash)
static VALUE rb_hash_empty_p(VALUE hash)
static VALUE env_invert(void)
static int hash_aset_str(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
static VALUE rb_hash_default(int argc, VALUE *argv, VALUE hash)
rb_funcall(memo->yielder, id_lshift, 1, rb_assoc_new(memo->prev_value, memo->prev_elts))
SSL_METHOD *(* func)(void)
#define rb_usascii_str_new2
VALUE rb_hash_values(VALUE hash)
static int rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
void rb_define_global_const(const char *, VALUE)
static void rb_hash_modify(VALUE hash)
static VALUE env_str_new2(const char *ptr)
static int foreach_safe_i(st_data_t key, st_data_t value, st_data_t args, int error)
VALUE rb_hash_select_bang(VALUE hash)
static int keys_i(VALUE key, VALUE value, VALUE ary)
#define rb_check_frozen(obj)
static ID id_flatten_bang
static VALUE env_to_s(void)
#define RHASH_ITER_LEV(h)
VALUE rb_hash_lookup2(VALUE, VALUE, VALUE)
static VALUE env_keys(void)
VALUE rb_obj_freeze(VALUE)
static VALUE env_delete_if(VALUE ehash)
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
static VALUE env_shift(void)
VALUE rb_ary_push(VALUE ary, VALUE item)
static int eql_i(VALUE key, VALUE val1, VALUE arg)
static VALUE env_each_pair(VALUE ehash)
static VALUE rb_env_size(VALUE ehash, VALUE args, VALUE eobj)
VALUE rb_hash_freeze(VALUE)
VALUE rb_str_buf_cat2(VALUE, const char *)
VALUE rb_protect(VALUE(*proc)(VALUE), VALUE data, int *state)
static int assoc_i(VALUE key, VALUE val, VALUE arg)
struct st_hash_type * type
void rb_raise(VALUE exc, const char *fmt,...)
static VALUE rb_hash_shift(VALUE hash)
static VALUE inspect_hash(VALUE hash, VALUE dummy, int recur)
VALUE rb_proc_lambda_p(VALUE)
VALUE rb_obj_class(VALUE)
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
static VALUE rb_hash_equal(VALUE hash1, VALUE hash2)
void rb_check_safe_obj(VALUE)
#define SafeStringValue(v)
#define ENVNMATCH(s1, s2, n)
#define OBJ_WB_UNPROTECT(x)
void rb_include_module(VALUE klass, VALUE module)
static int env_path_tainted(const char *)
static int values_i(VALUE key, VALUE value, VALUE ary)
VALUE rb_locale_str_new(const char *, long)
static VALUE env_keep_if(VALUE ehash)
static int rb_hash_update_i(VALUE key, VALUE value, VALUE hash)
static VALUE rb_hash_each_key(VALUE hash)
struct st_table * rb_hash_tbl_raw(VALUE hash)
st_index_t st_hash(const void *ptr, size_t len, st_index_t h)
rb_encoding * rb_utf8_encoding(void)
static int rb_hash_search_value(VALUE key, VALUE value, VALUE arg)
static VALUE rb_hash_replace(VALUE hash, VALUE hash2)
VALUE rb_str_new_frozen(VALUE)
VALUE rb_equal(VALUE, VALUE)
#define NOINSERT_UPDATE_CALLBACK(func)
static VALUE rb_hash_fetch_m(int argc, VALUE *argv, VALUE hash)
VALUE rb_dbl_hash(double d)
void rb_hash_foreach(VALUE, int(*)(ANYARGS), VALUE)
static VALUE env_rassoc(VALUE dmy, VALUE obj)
int rb_env_path_tainted(void)
VALUE rb_hash_delete(VALUE, VALUE)
static int rb_hash_update_func_i(VALUE key, VALUE value, VALUE arg0)
static VALUE env_each_key(VALUE ehash)
void rb_copy_generic_ivar(VALUE, VALUE)
st_index_t rb_hash_start(st_index_t)
static const char * check_envname(const char *name)
VALUE rb_hash_fetch(VALUE, VALUE)
void st_foreach_safe(struct st_table *, int(*)(ANYARGS), st_data_t)
int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg)
int st_delete(st_table *, st_data_t *, st_data_t *)
#define HAS_EXTRA_STATES(hash, klass)
static int rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg)
static VALUE env_key(VALUE dmy, VALUE value)
VALUE rb_block_proc(void)
int rb_block_given_p(void)
static VALUE env_assoc(VALUE env, VALUE key)
static VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc)
VALUE rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
VALUE rb_hash_reject_bang(VALUE hash)
VALUE rb_funcallv(VALUE, ID, int, const VALUE *)
Calls a method.
static VALUE env_select_bang(VALUE ehash)
static int assoc_cmp(VALUE a, VALUE b)
static VALUE rb_hash_initialize_copy(VALUE hash, VALUE hash2)
char * ruby_strdup(const char *)
static int hash_i(VALUE key, VALUE val, VALUE arg)
#define RARRAY_AREF(a, i)
RUBY_EXTERN VALUE rb_cHash
long rb_objid_hash(st_index_t index)
static int each_value_i(VALUE key, VALUE value)
VALUE rb_hash_clear(VALUE)
static char * w32_getenv(const char *name, UINT cp)
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
static VALUE rb_hash_eql(VALUE hash1, VALUE hash2)
static VALUE env_delete(VALUE obj, VALUE name)
void rb_sys_fail_str(VALUE mesg)
int rb_foreach_func(VALUE, VALUE, VALUE)
static VALUE rb_hash_to_h(VALUE hash)
static VALUE env_reject(void)
static VALUE rb_hash_each_pair(VALUE hash)
int rb_locale_encindex(void)
VALUE rb_check_hash_type(VALUE)
unsigned char buf[MIME_BUF_SIZE]
static int rb_any_cmp(VALUE a, VALUE b)
VALUE rb_hash_reject(VALUE hash)
static VALUE reset_hash_type(VALUE arg)
static int reject_i(VALUE key, VALUE value, VALUE result)
static VALUE rb_hash_to_hash(VALUE hash)
VALUE rb_str_buf_cat(VALUE, const char *, long)
static VALUE env_replace(VALUE env, VALUE hash)
static VALUE rb_hash_set_default(VALUE hash, VALUE ifnone)
#define RHASH_SET_IFNONE(h, ifnone)
static void rb_hash_modify_check(VALUE hash)
void rb_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
VALUE rb_tainted_str_new(const char *, long)
static VALUE rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
static char ** origenviron
static int select_i(VALUE key, VALUE value, VALUE result)
VALUE rb_str_resize(VALUE, long)
static VALUE rb_hash_index(VALUE hash, VALUE value)
static VALUE env_index(VALUE dmy, VALUE value)
static VALUE rb_hash_dup_empty(VALUE hash)
static VALUE rb_f_getenv(VALUE obj, VALUE name)
static VALUE hash_foreach_ensure(VALUE hash)
static VALUE env_inspect(void)
#define rb_ascii8bit_encindex()
VALUE rb_sprintf(const char *format,...)
static VALUE rb_hash_update(VALUE hash1, VALUE hash2)
static VALUE rb_hash_key(VALUE hash, VALUE value)
VALUE rb_ary_delete(VALUE ary, VALUE item)
static VALUE env_has_key(VALUE env, VALUE key)
#define unsetenv(name, val)
#define HASH_PROC_DEFAULT
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
static int each_pair_i_fast(VALUE key, VALUE value)
VALUE rb_assoc_new(VALUE car, VALUE cdr)
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
static VALUE rb_hash_compare_by_id_p(VALUE hash)
static int rb_hash_update_block_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
rb_encoding * rb_locale_encoding(void)
static VALUE lookup2_call(VALUE arg)
char * rb_w32_getenv(const char *)
static VALUE env_values(void)
static int clear_i(VALUE key, VALUE value, VALUE dummy)
VALUE rb_hash_keep_if(VALUE hash)
static VALUE hash_alloc(VALUE klass)
char * strchr(char *, char)
void rb_extend_object(VALUE obj, VALUE module)
rb_hash_aset(hash, RARRAY_AREF(key_value_pair, 0), RARRAY_AREF(key_value_pair, 1))
#define setenv(name, val)
static VALUE env_aset(VALUE obj, VALUE nm, VALUE val)
static VALUE env_to_a(void)
static VALUE hash_equal(VALUE hash1, VALUE hash2, int eql)
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
static VALUE rb_hash_flatten(int argc, VALUE *argv, VALUE hash)
VALUE rb_ensure(VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*e_proc)(ANYARGS), VALUE data2)
static int each_key_i(VALUE key, VALUE value)
void ruby_unsetenv(const char *name)
static VALUE env_select(VALUE ehash)
RUBY_EXTERN VALUE rb_cString
#define RUBY_DTRACE_HASH_CREATE_ENABLED()
VALUE rb_obj_is_proc(VALUE)
static VALUE env_none(void)
static VALUE env_size(void)
static int delete_if_i(VALUE key, VALUE value, VALUE hash)
static VALUE has_extra_methods(VALUE klass)
#define NEWOBJ_OF(obj, type, klass, flags)
static int inspect_i(VALUE key, VALUE value, VALUE str)
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to)
#define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn)
static VALUE rb_hash_compare_by_id(VALUE hash)
#define RARRAY_PTR_USE(ary, ptr_name, expr)
static VALUE to_hash(VALUE hash)
st_index_t st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never)
static VALUE hash_enum_size(VALUE hash, VALUE args, VALUE eobj)
int rb_method_basic_definition_p(VALUE, ID)
static int tbl_update(VALUE hash, VALUE key, int(*func)(st_data_t *key, st_data_t *val, st_data_t arg, int existing), st_data_t optional_arg)
static int flatten_i(VALUE key, VALUE val, VALUE ary)
struct st_hash_type st_hashtype_num
static VALUE env_to_hash(void)
static VALUE rb_hash_has_key(VALUE hash, VALUE key)
VALUE rb_check_array_type(VALUE ary)
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
#define RHASH_UPDATE_ITER(h, iter_lev, key, func, a)
st_index_t rb_str_hash(VALUE)
static int hash_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
void rb_syserr_fail_str(int e, VALUE mesg)
static VALUE hash_default_value(VALUE hash, VALUE key)
static VALUE env_values_at(int argc, VALUE *argv)
RUBY_EXTERN VALUE rb_cObject
VALUE rb_ary_includes(VALUE ary, VALUE item)
static int shift_i_safe(VALUE key, VALUE value, VALUE arg)
static st_index_t rb_any_hash(VALUE a)
static VALUE rb_hash_invert(VALUE hash)
rb_encoding * rb_filesystem_encoding(void)
int rb_respond_to(VALUE, ID)
static VALUE rb_hash_hash(VALUE hash)
static VALUE recursive_eql(VALUE hash, VALUE dt, int recur)
int st_insert(st_table *, st_data_t, st_data_t)
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
static int rassoc_i(VALUE key, VALUE val, VALUE arg)
int st_foreach_check(st_table *, int(*)(ANYARGS), st_data_t, st_data_t)
VALUE rb_str_new(const char *, long)
VALUE rb_hash_delete_if(VALUE)
static VALUE rb_hash_merge(VALUE hash1, VALUE hash2)
void st_clear(st_table *)
st_index_t(* hash)(ANYARGS)
VALUE rb_obj_alloc(VALUE)
st_table * st_init_table(const struct st_hash_type *)
st_index_t st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never)
VALUE rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
static int hash_aset(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
#define RBASIC_CLEAR_CLASS(obj)
int rb_str_hash_cmp(VALUE, VALUE)
static int key_i(VALUE key, VALUE value, VALUE arg)
static VALUE rb_hash_rehash(VALUE hash)
VALUE rb_hash_aref(VALUE, VALUE)
int rb_path_check(const char *)
int st_foreach_func(st_data_t, st_data_t, st_data_t)
static int env_replace_i(VALUE key, VALUE val, VALUE keys)
rb_hash_update_func * func
void ruby_register_rollback_func_for_ensure(VALUE(*ensure_func)(ANYARGS), VALUE(*rollback_func)(ANYARGS))
static VALUE env_empty_p(void)
VALUE rb_hash_assoc(VALUE hash, VALUE key)
static int to_a_i(VALUE key, VALUE value, VALUE ary)
st_table * st_copy(st_table *)
#define SPECIAL_CONST_P(x)
#define INTEGER_PACK_NATIVE_BYTE_ORDER
static VALUE hash_recursive(VALUE obj, VALUE arg, int recurse)
return rb_yield_values(2, rb_enum_values_pack(argc, argv), INT2NUM(n))
static VALUE hash_foreach_ensure_rollback(VALUE hash)
VALUE rb_filesystem_str_new_cstr(const char *)
int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t)
static VALUE env_reject_bang(VALUE ehash)
#define rb_float_value(v)
static VALUE env_fetch(int argc, VALUE *argv)
static struct st_hash_type objhash
VALUE rb_hash_select(VALUE hash)
static VALUE env_has_value(VALUE dmy, VALUE obj)
VALUE rb_check_string_type(VALUE)
#define REALLOC_N(var, type, n)
static VALUE env_update(VALUE env, VALUE hash)
void st_cleanup_safe(st_table *, st_data_t)
#define RGENGC_WB_PROTECTED_HASH
VALUE rb_hash_keys(VALUE hash)
static VALUE rb_hash_delete_key(VALUE hash, VALUE key)
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
void ruby_setenv(const char *name, const char *value)
void rb_warn(const char *fmt,...)
#define rb_obj_instance_variables(object)
struct st_hash_type * orighash
VALUE rb_convert_type(VALUE, int, const char *, const char *)
static void default_proc_arity_check(VALUE proc)
static struct st_table * hash_tbl(VALUE hash)
VALUE rb_check_convert_type(VALUE, int, const char *, const char *)
void st_free_table(st_table *)
static int rb_hash_update_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
void rb_gc_writebarrier_remember_promoted(VALUE obj)
VALUE rb_hash_rassoc(VALUE hash, VALUE obj)
static VALUE rb_hash_to_a(VALUE hash)
static VALUE rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
static int rb_hash_update_func_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
struct st_table * rb_hash_tbl(VALUE)
static VALUE env_str_new(const char *ptr, long len)
static VALUE rb_hash_default_proc(VALUE hash)
#define rb_hash_uint(h, i)
#define RUBY_DTRACE_HASH_CREATE(arg0, arg1, arg2)
static VALUE rb_hash_inspect(VALUE hash)
void rb_ary_set_len(VALUE ary, long len)