Ruby  2.5.0dev(2017-10-22revision60238)
Data Structures | Macros | Typedefs | Functions | Variables
variable.c File Reference
#include "internal.h"
#include "ruby/st.h"
#include "ruby/util.h"
#include "id_table.h"
#include "constant.h"
#include "id.h"
#include "ccan/list/list.h"
#include "debug_counter.h"

Go to the source code of this file.

Data Structures

struct  gen_ivtbl
 
struct  ivar_update
 
struct  fc_result
 
struct  trace_var
 
struct  rb_global_variable
 
struct  trace_data
 
struct  obj_ivar_tag
 
struct  gen_ivar_tag
 
struct  givar_copy
 
struct  autoload_state
 
struct  autoload_data_i
 
struct  autoload_const_set_args
 

Macros

#define rb_is_constant_id   rb_is_const_id
 
#define rb_is_constant_name   rb_is_const_name
 
#define id_for_var(obj, name, part, type)   id_for_var_message(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name")
 
#define id_for_var_message(obj, name, type, message)   check_id_type(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message))
 
#define check_autoload_table(av)   (struct st_table *)rb_check_typeddata((av), &autoload_data_type)
 
#define check_autoload_data(av)   (struct autoload_data_i *)rb_check_typeddata((av), &autoload_data_i_type)
 
#define CVAR_FOREACH_ANCESTORS(klass, v, r)
 
#define CVAR_LOOKUP(v, r)
 

Typedefs

typedef VALUE(* path_cache_func) (VALUE obj, VALUE name)
 

Functions

void Init_var_tables (void)
 
VALUE rb_mod_name (VALUE mod)
 
VALUE rb_class_path (VALUE klass)
 
VALUE rb_class_path_no_cache (VALUE klass)
 
VALUE rb_class_path_cached (VALUE klass)
 
VALUE rb_search_class_path (VALUE klass)
 
void rb_set_class_path_string (VALUE klass, VALUE under, VALUE name)
 
void rb_set_class_path (VALUE klass, VALUE under, const char *name)
 
VALUE rb_path_to_class (VALUE pathname)
 
VALUE rb_path2class (const char *path)
 
void rb_name_class (VALUE klass, ID id)
 
VALUE rb_class_name (VALUE klass)
 
const char * rb_class2name (VALUE klass)
 
const char * rb_obj_classname (VALUE obj)
 
struct rb_global_entryrb_global_entry (ID id)
 
VALUE rb_gvar_undef_getter (ID id, void *data, struct rb_global_variable *var)
 
void rb_gvar_undef_setter (VALUE val, ID id, void *d, struct rb_global_variable *var)
 
void rb_gvar_undef_marker (VALUE *var)
 
VALUE rb_gvar_val_getter (ID id, void *data, struct rb_global_variable *var)
 
void rb_gvar_val_setter (VALUE val, ID id, void *data, struct rb_global_variable *var)
 
void rb_gvar_val_marker (VALUE *var)
 
VALUE rb_gvar_var_getter (ID id, void *data, struct rb_global_variable *gvar)
 
void rb_gvar_var_setter (VALUE val, ID id, void *data, struct rb_global_variable *g)
 
void rb_gvar_var_marker (VALUE *var)
 
void rb_gvar_readonly_setter (VALUE v, ID id, void *d, struct rb_global_variable *g)
 
void rb_gc_mark_global_tbl (void)
 
void rb_define_hooked_variable (const char *name, VALUE *var, VALUE(*getter)(ANYARGS), void(*setter)(ANYARGS))
 
void rb_define_variable (const char *name, VALUE *var)
 
void rb_define_readonly_variable (const char *name, const VALUE *var)
 
void rb_define_virtual_variable (const char *name, VALUE(*getter)(ANYARGS), void(*setter)(ANYARGS))
 
VALUE rb_f_trace_var (int argc, const VALUE *argv)
 
VALUE rb_f_untrace_var (int argc, const VALUE *argv)
 
VALUE rb_gvar_get (struct rb_global_entry *entry)
 
VALUE rb_gvar_set (struct rb_global_entry *entry, VALUE val)
 
VALUE rb_gv_set (const char *name, VALUE val)
 
VALUE rb_gv_get (const char *name)
 
VALUE rb_gvar_defined (struct rb_global_entry *entry)
 
VALUE rb_f_global_variables (void)
 
void rb_alias_variable (ID name1, ID name2)
 
void rb_mark_generic_ivar (VALUE obj)
 
void rb_free_generic_ivar (VALUE obj)
 
RUBY_FUNC_EXPORTED size_t rb_generic_ivar_memsize (VALUE obj)
 
VALUE rb_ivar_lookup (VALUE obj, ID id, VALUE undef)
 
VALUE rb_ivar_get (VALUE obj, ID id)
 
VALUE rb_attr_get (VALUE obj, ID id)
 
VALUE rb_attr_delete (VALUE obj, ID id)
 
VALUE rb_ivar_set (VALUE obj, ID id, VALUE val)
 
VALUE rb_ivar_defined (VALUE obj, ID id)
 
void rb_copy_generic_ivar (VALUE clone, VALUE obj)
 
void rb_ivar_foreach (VALUE obj, int(*func)(ANYARGS), st_data_t arg)
 
st_index_t rb_ivar_count (VALUE obj)
 
VALUE rb_obj_instance_variables (VALUE obj)
 
VALUE rb_obj_remove_instance_variable (VALUE obj, VALUE name)
 
 NORETURN (static void uninitialized_constant(VALUE, VALUE))
 
VALUE rb_const_missing (VALUE klass, VALUE name)
 
VALUE rb_mod_const_missing (VALUE klass, VALUE name)
 
void rb_autoload (VALUE mod, ID id, const char *file)
 
void rb_autoload_str (VALUE mod, ID id, VALUE file)
 
int rb_autoloading_value (VALUE mod, ID id, VALUE *value)
 
VALUE rb_autoload_load (VALUE mod, ID id)
 
VALUE rb_autoload_p (VALUE mod, ID id)
 
void rb_const_warn_if_deprecated (const rb_const_entry_t *ce, VALUE klass, ID id)
 
VALUE rb_const_get_from (VALUE klass, ID id)
 
VALUE rb_const_get (VALUE klass, ID id)
 
VALUE rb_const_get_at (VALUE klass, ID id)
 
VALUE rb_public_const_get_from (VALUE klass, ID id)
 
VALUE rb_public_const_get (VALUE klass, ID id)
 
VALUE rb_public_const_get_at (VALUE klass, ID id)
 
VALUE rb_mod_remove_const (VALUE mod, VALUE name)
 
VALUE rb_const_remove (VALUE mod, ID id)
 
void * rb_mod_const_at (VALUE mod, void *data)
 
void * rb_mod_const_of (VALUE mod, void *data)
 
VALUE rb_const_list (void *data)
 
VALUE rb_mod_constants (int argc, const VALUE *argv, VALUE mod)
 
int rb_const_defined_from (VALUE klass, ID id)
 
int rb_const_defined (VALUE klass, ID id)
 
int rb_const_defined_at (VALUE klass, ID id)
 
int rb_public_const_defined_from (VALUE klass, ID id)
 
int rb_public_const_defined (VALUE klass, ID id)
 
int rb_public_const_defined_at (VALUE klass, ID id)
 
void rb_const_set (VALUE klass, ID id, VALUE val)
 
void rb_define_const (VALUE klass, const char *name, VALUE val)
 
void rb_define_global_const (const char *name, VALUE val)
 
void rb_deprecate_constant (VALUE mod, const char *name)
 
VALUE rb_mod_private_constant (int argc, const VALUE *argv, VALUE obj)
 
VALUE rb_mod_public_constant (int argc, const VALUE *argv, VALUE obj)
 
VALUE rb_mod_deprecate_constant (int argc, const VALUE *argv, VALUE obj)
 
void rb_cvar_set (VALUE klass, ID id, VALUE val)
 
VALUE rb_cvar_get (VALUE klass, ID id)
 
VALUE rb_cvar_defined (VALUE klass, ID id)
 
void rb_cv_set (VALUE klass, const char *name, VALUE val)
 
VALUE rb_cv_get (VALUE klass, const char *name)
 
void rb_define_class_variable (VALUE klass, const char *name, VALUE val)
 
VALUE rb_mod_class_variables (int argc, const VALUE *argv, VALUE mod)
 
VALUE rb_mod_remove_cvar (VALUE mod, VALUE name)
 
VALUE rb_iv_get (VALUE obj, const char *name)
 
VALUE rb_iv_set (VALUE obj, const char *name, VALUE val)
 
int rb_class_ivar_set (VALUE obj, ID key, VALUE value)
 
st_tablerb_st_copy (VALUE obj, struct st_table *orig_tbl)
 
rb_const_entry_trb_const_lookup (VALUE klass, ID id)
 

Variables

struct rb_id_tablerb_global_tbl
 

Macro Definition Documentation

◆ check_autoload_data

#define check_autoload_data (   av)    (struct autoload_data_i *)rb_check_typeddata((av), &autoload_data_i_type)

Definition at line 1882 of file variable.c.

◆ check_autoload_table

#define check_autoload_table (   av)    (struct st_table *)rb_check_typeddata((av), &autoload_data_type)

Definition at line 1825 of file variable.c.

◆ CVAR_FOREACH_ANCESTORS

#define CVAR_FOREACH_ANCESTORS (   klass,
  v,
 
)
Value:
for (klass = cvar_front_klass(klass); klass; klass = RCLASS_SUPER(klass)) { \
if (cvar_lookup_at(klass, id, (v))) { \
r; \
} \
}
#define RCLASS_SUPER(c)
Definition: classext.h:16

Definition at line 2833 of file variable.c.

◆ CVAR_LOOKUP

#define CVAR_LOOKUP (   v,
 
)
Value:
do {\
if (cvar_lookup_at(klass, id, (v))) {r;}\
CVAR_FOREACH_ANCESTORS(klass, v, r);\
} while(0)

Definition at line 2840 of file variable.c.

Referenced by rb_cvar_defined(), rb_cvar_get(), and rb_cvar_set().

◆ id_for_var

#define id_for_var (   obj,
  name,
  part,
  type 
)    id_for_var_message(obj, name, type, "`%1$s' is not allowed as "#part" "#type" variable name")

Definition at line 1645 of file variable.c.

Referenced by rb_mod_remove_const(), and rb_obj_remove_instance_variable().

◆ id_for_var_message

#define id_for_var_message (   obj,
  name,
  type,
  message 
)    check_id_type(obj, &(name), rb_is_##type##_id, rb_is_##type##_name, message, strlen(message))

Definition at line 1647 of file variable.c.

Referenced by rb_mod_remove_cvar().

◆ rb_is_constant_id

#define rb_is_constant_id   rb_is_const_id

Definition at line 1643 of file variable.c.

◆ rb_is_constant_name

#define rb_is_constant_name   rb_is_const_name

Definition at line 1644 of file variable.c.

Typedef Documentation

◆ path_cache_func

typedef VALUE(* path_cache_func) (VALUE obj, VALUE name)

Definition at line 257 of file variable.c.

Function Documentation

◆ Init_var_tables()

void Init_var_tables ( void  )

Definition at line 49 of file variable.c.

References rb_id_table_create(), and st_init_numtable.

◆ NORETURN()

NORETURN ( static void   uninitialized_constantVALUE, VALUE)

◆ rb_alias_variable()

void rb_alias_variable ( ID  name1,
ID  name2 
)

◆ rb_attr_delete()

VALUE rb_attr_delete ( VALUE  obj,
ID  id 
)

Definition at line 1266 of file variable.c.

◆ rb_attr_get()

VALUE rb_attr_get ( VALUE  obj,
ID  id 
)

◆ rb_autoload()

void rb_autoload ( VALUE  mod,
ID  id,
const char *  file 
)

Definition at line 1886 of file variable.c.

References rb_autoload_str(), rb_eArgError, rb_fstring_cstr(), and rb_raise().

◆ rb_autoload_load()

VALUE rb_autoload_load ( VALUE  mod,
ID  id 
)

Definition at line 2151 of file variable.c.

◆ rb_autoload_p()

VALUE rb_autoload_p ( VALUE  mod,
ID  id 
)

Definition at line 2201 of file variable.c.

◆ rb_autoload_str()

void rb_autoload_str ( VALUE  mod,
ID  id,
VALUE  file 
)

◆ rb_autoloading_value()

int rb_autoloading_value ( VALUE  mod,
ID  id,
VALUE value 
)

Definition at line 2015 of file variable.c.

◆ rb_class2name()

const char* rb_class2name ( VALUE  klass)

Definition at line 450 of file variable.c.

References fc_result::path.

Referenced by rb_clear_method_cache_by_class(), and rb_obj_classname().

◆ rb_class_ivar_set()

int rb_class_ivar_set ( VALUE  obj,
ID  key,
VALUE  value 
)

Definition at line 3104 of file variable.c.

References RCLASS_IV_TBL.

Referenced by rb_singleton_class_attached().

◆ rb_class_name()

VALUE rb_class_name ( VALUE  klass)

Definition at line 444 of file variable.c.

References rb_class_path(), and rb_class_real().

Referenced by rb_any_to_s(), rb_const_warn_if_deprecated(), rb_cvar_get(), and rb_cvar_set().

◆ rb_class_path()

VALUE rb_class_path ( VALUE  klass)

Definition at line 295 of file variable.c.

References fc_result::path.

Referenced by rb_class_name(), rb_define_class_id_under(), and rb_thread_current_status().

◆ rb_class_path_cached()

VALUE rb_class_path_cached ( VALUE  klass)

Definition at line 319 of file variable.c.

References Qnil, RCLASS_IV_TBL, st_data_t, and st_lookup.

◆ rb_class_path_no_cache()

VALUE rb_class_path_no_cache ( VALUE  klass)

Definition at line 310 of file variable.c.

References fc_result::path.

Referenced by rb_vm_inc_const_missing_count(), and ruby_th_dtrace_setup().

◆ rb_const_defined()

int rb_const_defined ( VALUE  klass,
ID  id 
)

Definition at line 2537 of file variable.c.

Referenced by Init_cparse(), rb_define_class(), and rb_define_module().

◆ rb_const_defined_at()

int rb_const_defined_at ( VALUE  klass,
ID  id 
)

◆ rb_const_defined_from()

int rb_const_defined_from ( VALUE  klass,
ID  id 
)

Definition at line 2531 of file variable.c.

◆ rb_const_get()

VALUE rb_const_get ( VALUE  klass,
ID  id 
)

◆ rb_const_get_at()

VALUE rb_const_get_at ( VALUE  klass,
ID  id 
)

Definition at line 2298 of file variable.c.

Referenced by Init_cparse(), rb_define_class_id_under(), and rb_define_module_id_under().

◆ rb_const_get_from()

VALUE rb_const_get_from ( VALUE  klass,
ID  id 
)

Definition at line 2286 of file variable.c.

◆ rb_const_list()

VALUE rb_const_list ( void *  data)

Definition at line 2449 of file variable.c.

References st_table::num_entries, rb_ary_new2, and st_foreach_safe().

Referenced by rb_mod_constants().

◆ rb_const_lookup()

rb_const_entry_t* rb_const_lookup ( VALUE  klass,
ID  id 
)

Definition at line 3128 of file variable.c.

References rb_id_table_lookup(), RCLASS_CONST_TBL, and val.

Referenced by rb_autoload_str(), rb_const_remove(), and rb_deprecate_constant().

◆ rb_const_missing()

VALUE rb_const_missing ( VALUE  klass,
VALUE  name 
)

Definition at line 1747 of file variable.c.

References rb_funcallv, rb_intern, and rb_vm_inc_const_missing_count().

◆ rb_const_remove()

VALUE rb_const_remove ( VALUE  mod,
ID  id 
)

◆ rb_const_set()

void rb_const_set ( VALUE  klass,
ID  id,
VALUE  val 
)

◆ rb_const_warn_if_deprecated()

void rb_const_warn_if_deprecated ( const rb_const_entry_t ce,
VALUE  klass,
ID  id 
)

Definition at line 2216 of file variable.c.

References PRIsVALUE, QUOTE_ID, rb_class_name(), rb_cObject, RB_CONST_DEPRECATED_P, and rb_warn().

◆ rb_copy_generic_ivar()

void rb_copy_generic_ivar ( VALUE  clone,
VALUE  obj 
)

Definition at line 1502 of file variable.c.

References FL_EXIVAR, FL_TEST, FL_UNSET, rb_check_frozen, and rb_free_generic_ivar().

◆ rb_cv_get()

VALUE rb_cv_get ( VALUE  klass,
const char *  name 
)

Definition at line 2932 of file variable.c.

◆ rb_cv_set()

void rb_cv_set ( VALUE  klass,
const char *  name,
VALUE  val 
)

Definition at line 2925 of file variable.c.

◆ rb_cvar_defined()

VALUE rb_cvar_defined ( VALUE  klass,
ID  id 
)

Definition at line 2906 of file variable.c.

References CVAR_LOOKUP, Qfalse, and Qtrue.

Referenced by rb_mod_remove_cvar().

◆ rb_cvar_get()

VALUE rb_cvar_get ( VALUE  klass,
ID  id 
)

◆ rb_cvar_set()

void rb_cvar_set ( VALUE  klass,
ID  id,
VALUE  val 
)

◆ rb_define_class_variable()

void rb_define_class_variable ( VALUE  klass,
const char *  name,
VALUE  val 
)

Definition at line 2939 of file variable.c.

◆ rb_define_const()

void rb_define_const ( VALUE  klass,
const char *  name,
VALUE  val 
)

◆ rb_define_global_const()

void rb_define_global_const ( const char *  name,
VALUE  val 
)

Definition at line 2702 of file variable.c.

References rb_cObject, and rb_define_const().

◆ rb_define_hooked_variable()

void rb_define_hooked_variable ( const char *  name,
VALUE var,
VALUE(*)(ANYARGS getter,
void(*)(ANYARGS setter 
)

◆ rb_define_readonly_variable()

void rb_define_readonly_variable ( const char *  name,
const VALUE var 
)

Definition at line 642 of file variable.c.

References rb_define_hooked_variable(), and rb_gvar_readonly_setter().

◆ rb_define_variable()

void rb_define_variable ( const char *  name,
VALUE var 
)

Definition at line 636 of file variable.c.

References rb_define_hooked_variable().

◆ rb_define_virtual_variable()

void rb_define_virtual_variable ( const char *  name,
VALUE(*)(ANYARGS getter,
void(*)(ANYARGS setter 
)

◆ rb_deprecate_constant()

void rb_deprecate_constant ( VALUE  mod,
const char *  name 
)

◆ rb_f_global_variables()

VALUE rb_f_global_variables ( void  )

Definition at line 884 of file variable.c.

References rb_ary_new(), rb_backref_get(), rb_id_table_foreach(), and sym.

◆ rb_f_trace_var()

VALUE rb_f_trace_var ( int  argc,
const VALUE argv 
)

◆ rb_f_untrace_var()

VALUE rb_f_untrace_var ( int  argc,
const VALUE argv 
)

◆ rb_free_generic_ivar()

void rb_free_generic_ivar ( VALUE  obj)

Definition at line 1133 of file variable.c.

References RUBY_FUNC_EXPORTED, st_data_t, st_delete, st_free_table, and xfree().

Referenced by rb_copy_generic_ivar().

◆ rb_gc_mark_global_tbl()

void rb_gc_mark_global_tbl ( void  )

Definition at line 594 of file variable.c.

References rb_id_table_foreach_values().

◆ rb_generic_ivar_memsize()

RUBY_FUNC_EXPORTED size_t rb_generic_ivar_memsize ( VALUE  obj)

Definition at line 1150 of file variable.c.

◆ rb_global_entry()

◆ rb_gv_get()

VALUE rb_gv_get ( const char *  name)

Definition at line 851 of file variable.c.

References rb_global_entry().

◆ rb_gv_set()

VALUE rb_gv_set ( const char *  name,
VALUE  val 
)

Definition at line 842 of file variable.c.

References rb_global_entry().

◆ rb_gvar_defined()

VALUE rb_gvar_defined ( struct rb_global_entry entry)

◆ rb_gvar_get()

VALUE rb_gvar_get ( struct rb_global_entry entry)

◆ rb_gvar_readonly_setter()

void rb_gvar_readonly_setter ( VALUE  v,
ID  id,
void *  d,
struct rb_global_variable g 
)

Definition at line 572 of file variable.c.

References PRIsVALUE, QUOTE_ID, and rb_name_error().

Referenced by rb_define_readonly_variable(), and rb_define_virtual_variable().

◆ rb_gvar_set()

VALUE rb_gvar_set ( struct rb_global_entry entry,
VALUE  val 
)

◆ rb_gvar_undef_getter()

VALUE rb_gvar_undef_getter ( ID  id,
void *  data,
struct rb_global_variable var 
)

Definition at line 510 of file variable.c.

References PRIsVALUE, Qnil, QUOTE_ID, and rb_warning().

Referenced by rb_global_entry(), and rb_gvar_defined().

◆ rb_gvar_undef_marker()

void rb_gvar_undef_marker ( VALUE var)

Definition at line 528 of file variable.c.

Referenced by rb_global_entry().

◆ rb_gvar_undef_setter()

void rb_gvar_undef_setter ( VALUE  val,
ID  id,
void *  d,
struct rb_global_variable var 
)

◆ rb_gvar_val_getter()

VALUE rb_gvar_val_getter ( ID  id,
void *  data,
struct rb_global_variable var 
)

Definition at line 533 of file variable.c.

Referenced by rb_define_virtual_variable(), and rb_gvar_undef_setter().

◆ rb_gvar_val_marker()

void rb_gvar_val_marker ( VALUE var)

Definition at line 545 of file variable.c.

References rb_gc_mark_maybe().

Referenced by rb_gvar_undef_setter().

◆ rb_gvar_val_setter()

void rb_gvar_val_setter ( VALUE  val,
ID  id,
void *  data,
struct rb_global_variable var 
)

Definition at line 539 of file variable.c.

References rb_global_variable::data.

Referenced by rb_gvar_undef_setter().

◆ rb_gvar_var_getter()

VALUE rb_gvar_var_getter ( ID  id,
void *  data,
struct rb_global_variable gvar 
)

Definition at line 552 of file variable.c.

References Qnil, and rb_global_entry::var.

◆ rb_gvar_var_marker()

void rb_gvar_var_marker ( VALUE var)

Definition at line 566 of file variable.c.

References rb_gc_mark_maybe().

◆ rb_gvar_var_setter()

void rb_gvar_var_setter ( VALUE  val,
ID  id,
void *  data,
struct rb_global_variable g 
)

Definition at line 560 of file variable.c.

◆ rb_iv_get()

VALUE rb_iv_get ( VALUE  obj,
const char *  name 
)

Definition at line 3087 of file variable.c.

References rb_intern, and rb_ivar_get().

◆ rb_iv_set()

VALUE rb_iv_set ( VALUE  obj,
const char *  name,
VALUE  val 
)

Definition at line 3095 of file variable.c.

References rb_intern, and rb_ivar_set().

Referenced by Init_md5(), Init_rmd160(), and Init_sha1().

◆ rb_ivar_count()

st_index_t rb_ivar_count ( VALUE  obj)

◆ rb_ivar_defined()

VALUE rb_ivar_defined ( VALUE  obj,
ID  id 
)

◆ rb_ivar_foreach()

void rb_ivar_foreach ( VALUE  obj,
int(*)(ANYARGS func,
st_data_t  arg 
)

Definition at line 1544 of file variable.c.

References BUILTIN_TYPE, SPECIAL_CONST_P, and T_OBJECT.

Referenced by rb_obj_instance_variables().

◆ rb_ivar_get()

VALUE rb_ivar_get ( VALUE  obj,
ID  id 
)

◆ rb_ivar_lookup()

VALUE rb_ivar_lookup ( VALUE  obj,
ID  id,
VALUE  undef 
)

◆ rb_ivar_set()

VALUE rb_ivar_set ( VALUE  obj,
ID  id,
VALUE  val 
)

◆ rb_mark_generic_ivar()

void rb_mark_generic_ivar ( VALUE  obj)

Definition at line 1123 of file variable.c.

◆ rb_mod_class_variables()

VALUE rb_mod_class_variables ( int  argc,
const VALUE argv,
VALUE  mod 
)

Definition at line 3025 of file variable.c.

References Qtrue, rb_scan_args(), and RTEST.

◆ rb_mod_const_at()

void* rb_mod_const_at ( VALUE  mod,
void *  data 
)

Definition at line 2414 of file variable.c.

References rb_id_table_foreach(), RCLASS_CONST_TBL, and st_init_numtable.

Referenced by rb_mod_const_of().

◆ rb_mod_const_missing()

VALUE rb_mod_const_missing ( VALUE  klass,
VALUE  name 
)

Definition at line 1792 of file variable.c.

References rb_vm_pop_cfunc_frame().

◆ rb_mod_const_of()

void* rb_mod_const_of ( VALUE  mod,
void *  data 
)

Definition at line 2427 of file variable.c.

References mod, rb_cObject, rb_mod_const_at(), and RCLASS_SUPER.

Referenced by rb_mod_constants().

◆ rb_mod_constants()

VALUE rb_mod_constants ( int  argc,
const VALUE argv,
VALUE  mod 
)

Definition at line 2481 of file variable.c.

References Qtrue, rb_const_list(), rb_mod_const_of(), rb_scan_args(), and RTEST.

◆ rb_mod_deprecate_constant()

VALUE rb_mod_deprecate_constant ( int  argc,
const VALUE argv,
VALUE  obj 
)

Definition at line 2800 of file variable.c.

◆ rb_mod_name()

VALUE rb_mod_name ( VALUE  mod)

Definition at line 229 of file variable.c.

References fc_result::path.

◆ rb_mod_private_constant()

VALUE rb_mod_private_constant ( int  argc,
const VALUE argv,
VALUE  obj 
)

Definition at line 2772 of file variable.c.

◆ rb_mod_public_constant()

VALUE rb_mod_public_constant ( int  argc,
const VALUE argv,
VALUE  obj 
)

Definition at line 2786 of file variable.c.

◆ rb_mod_remove_const()

VALUE rb_mod_remove_const ( VALUE  mod,
VALUE  name 
)

Definition at line 2332 of file variable.c.

References id_for_var, rb_const_remove(), and rb_name_err_raise.

◆ rb_mod_remove_cvar()

VALUE rb_mod_remove_cvar ( VALUE  mod,
VALUE  name 
)

◆ rb_name_class()

void rb_name_class ( VALUE  klass,
ID  id 
)

Definition at line 438 of file variable.c.

References rb_ivar_set().

Referenced by rb_define_class(), and rb_define_module_id().

◆ rb_obj_classname()

const char* rb_obj_classname ( VALUE  obj)

Definition at line 459 of file variable.c.

References CLASS_OF, and rb_class2name().

Referenced by rb_Hash().

◆ rb_obj_instance_variables()

VALUE rb_obj_instance_variables ( VALUE  obj)

Definition at line 1634 of file variable.c.

References rb_ary_new(), and rb_ivar_foreach().

◆ rb_obj_remove_instance_variable()

VALUE rb_obj_remove_instance_variable ( VALUE  obj,
VALUE  name 
)

◆ rb_path2class()

VALUE rb_path2class ( const char *  path)

Definition at line 432 of file variable.c.

References rb_path_to_class(), and rb_str_new_cstr().

Referenced by Init_md5(), Init_ossl_digest(), Init_rmd160(), and Init_sha1().

◆ rb_path_to_class()

VALUE rb_path_to_class ( VALUE  pathname)

◆ rb_public_const_defined()

int rb_public_const_defined ( VALUE  klass,
ID  id 
)

Definition at line 2555 of file variable.c.

◆ rb_public_const_defined_at()

int rb_public_const_defined_at ( VALUE  klass,
ID  id 
)

Definition at line 2561 of file variable.c.

◆ rb_public_const_defined_from()

int rb_public_const_defined_from ( VALUE  klass,
ID  id 
)

Definition at line 2549 of file variable.c.

◆ rb_public_const_get()

VALUE rb_public_const_get ( VALUE  klass,
ID  id 
)

Definition at line 2310 of file variable.c.

◆ rb_public_const_get_at()

VALUE rb_public_const_get_at ( VALUE  klass,
ID  id 
)

Definition at line 2316 of file variable.c.

◆ rb_public_const_get_from()

VALUE rb_public_const_get_from ( VALUE  klass,
ID  id 
)

Definition at line 2304 of file variable.c.

◆ rb_search_class_path()

VALUE rb_search_class_path ( VALUE  klass)

Definition at line 337 of file variable.c.

Referenced by rb_vm_bugreport().

◆ rb_set_class_path()

void rb_set_class_path ( VALUE  klass,
VALUE  under,
const char *  name 
)

Definition at line 367 of file variable.c.

◆ rb_set_class_path_string()

void rb_set_class_path_string ( VALUE  klass,
VALUE  under,
VALUE  name 
)

Definition at line 344 of file variable.c.

Referenced by rb_define_class_id_under(), and rb_define_module_id_under().

◆ rb_st_copy()

st_table* rb_st_copy ( VALUE  obj,
struct st_table orig_tbl 
)

Definition at line 3120 of file variable.c.

References st_copy, and st_foreach.

Variable Documentation

◆ rb_global_tbl

struct rb_id_table* rb_global_tbl

Definition at line 24 of file variable.c.