Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | rb_const_entry_struct |
Macros | |
#define | RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE) |
#define | RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC) |
#define | RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED) |
Typedefs | |
typedef struct rb_const_entry_struct | rb_const_entry_t |
Enumerations | |
enum | rb_const_flag_t { CONST_DEPRECATED = 0x100, CONST_VISIBILITY_MASK = 0xff, CONST_PUBLIC = 0x00, CONST_PRIVATE, CONST_VISIBILITY_MAX } |
Functions | |
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_free_const_table (struct rb_id_table *tbl) |
VALUE | rb_public_const_get (VALUE klass, ID id) |
VALUE | rb_public_const_get_at (VALUE klass, ID id) |
VALUE | rb_public_const_get_from (VALUE klass, ID id) |
int | rb_public_const_defined (VALUE klass, ID id) |
int | rb_public_const_defined_at (VALUE klass, ID id) |
int | rb_public_const_defined_from (VALUE klass, ID id) |
rb_const_entry_t * | rb_const_lookup (VALUE klass, ID id) |
#define RB_CONST_DEPRECATED_P | ( | ce | ) | ((ce)->flag & CONST_DEPRECATED) |
Definition at line 28 of file constant.h.
Referenced by rb_const_warn_if_deprecated().
#define RB_CONST_PRIVATE_P | ( | ce | ) | (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE) |
Definition at line 23 of file constant.h.
Referenced by rb_const_defined_0(), rb_const_search(), and rb_local_constants_i().
#define RB_CONST_PUBLIC_P | ( | ce | ) | (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC) |
Definition at line 25 of file constant.h.
Referenced by list_i().
typedef struct rb_const_entry_struct rb_const_entry_t |
enum rb_const_flag_t |
Enumerator | |
---|---|
CONST_DEPRECATED | |
CONST_VISIBILITY_MASK | |
CONST_PUBLIC | |
CONST_PRIVATE | |
CONST_VISIBILITY_MAX |
Definition at line 14 of file constant.h.
rb_const_entry_t* rb_const_lookup | ( | VALUE | klass, |
ID | id | ||
) |
Definition at line 3171 of file variable.c.
References rb_id_table_lookup(), RCLASS_CONST_TBL, and val.
Referenced by autoload_defined_p(), rb_autoload_str(), rb_const_defined_0(), rb_const_remove(), rb_const_search(), rb_deprecate_constant(), set_const_visibility(), and vm_get_ev_const().
void rb_free_const_table | ( | struct rb_id_table * | tbl | ) |
Definition at line 2091 of file gc.c.
References free_const_entry_i(), rb_id_table_foreach_values(), and rb_id_table_free().
Referenced by obj_free(), and rb_mod_init_copy().
Definition at line 2843 of file variable.c.
References CONST_DEPRECATED, and set_const_visibility().
Referenced by InitVM_Object().
Definition at line 2815 of file variable.c.
References CONST_PRIVATE, CONST_VISIBILITY_MASK, and set_const_visibility().
Referenced by InitVM_Object().
Definition at line 2829 of file variable.c.
References CONST_PUBLIC, CONST_VISIBILITY_MASK, and set_const_visibility().
Referenced by InitVM_Object().
Definition at line 2598 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Definition at line 2604 of file variable.c.
References FALSE, rb_const_defined_0(), and TRUE.
Definition at line 2592 of file variable.c.
References rb_const_defined_0(), and TRUE.
Referenced by vm_get_ev_const().
Definition at line 2353 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
Definition at line 2359 of file variable.c.
References FALSE, rb_const_get_0(), and TRUE.
Definition at line 2347 of file variable.c.
References rb_const_get_0(), and TRUE.
Referenced by vm_get_ev_const().