Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/st.h"
#include "symbol.h"
#include "gc.h"
#include "probes.h"
#include "id.c"
#include "id_table.c"
Go to the source code of this file.
Data Structures | |
struct | symbols |
Macros | |
#define | SYMBOL_DEBUG 0 |
#define | SYMBOL_PINNED_P(sym) (RSYMBOL(sym)->id&~ID_SCOPE_MASK) |
#define | STATIC_SYM2ID(sym) RSHIFT((unsigned long)(sym), RUBY_SPECIAL_SHIFT) |
#define | REGISTER_SYMID(id, name) register_static_symid((id), (name), strlen(name), enc) |
#define | is_identchar(p, e, enc) (ISALNUM((unsigned char)*(p)) || (*(p)) == '_' || !ISASCII(*(p))) |
#define | op_tbl_count numberof(op_tbl) |
#define | op_tbl_len(i) (!op_tbl[i].name[1] ? 1 : !op_tbl[i].name[2] ? 2 : 3) |
#define | IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) |
#define | IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) |
Enumerations | |
enum | { ID_ENTRY_UNIT = 512 } |
enum | id_entry_type { ID_ENTRY_STR, ID_ENTRY_SYM, ID_ENTRY_SIZE } |
Variables | |
static struct symbols | global_symbols = {tNEXT_ID-1} |
static const struct st_hash_type | symhash |
#define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) |
Definition at line 202 of file symbol.c.
Referenced by intern_str(), rb_is_attrset_name(), and rb_str_intern().
#define IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) |
Definition at line 201 of file symbol.c.
Referenced by rb_enc_symname2_p(), and rb_is_junk_name().
#define is_identchar | ( | p, | |
e, | |||
enc | |||
) | (ISALNUM((unsigned char)*(p)) || (*(p)) == '_' || !ISASCII(*(p))) |
Definition at line 31 of file symbol.c.
Referenced by is_special_global_name(), and rb_enc_symname_type().
Definition at line 33 of file symbol.c.
Referenced by Init_op_tbl().
Definition at line 35 of file symbol.c.
Referenced by Init_op_tbl().
#define STATIC_SYM2ID | ( | sym | ) | RSHIFT((unsigned long)(sym), RUBY_SPECIAL_SHIFT) |
Definition at line 24 of file symbol.c.
Referenced by lookup_str_id(), rb_check_id(), rb_sym2id(), and rb_sym2str().
#define SYMBOL_PINNED_P | ( | sym | ) | (RSYMBOL(sym)->id&~ID_SCOPE_MASK) |
Definition at line 22 of file symbol.c.
Referenced by rb_check_id(), rb_check_symbol(), and symbols_i().
enum id_entry_type |
Definition at line 1074 of file symbol.c.
References attrsetname_to_attr_id(), and rb_is_attrset_name().
Referenced by Init_sym(), and rb_id_attrget().
Definition at line 1056 of file symbol.c.
References id, lookup_str_id(), OBJ_FREEZE, rb_enc_get(), RB_GC_GUARD, rb_setup_fake_str(), RSTRING_LEN, and RSTRING_PTR.
Referenced by attrsetname_to_attr(), and Init_sym().
|
static |
Definition at line 470 of file symbol.c.
References symbols::dsymbol_fstr_hash, FL_WB_PROTECTED, global_symbols, OBJ_FREEZE, Qtrue, rb_enc_associate(), rb_hash_aset(), rb_newobj_of(), RB_OBJ_WRITE, rb_str_hash(), register_sym(), RSTRING_PTR, RSYMBOL, RUBY_DTRACE_CREATE_HOOK, and T_SYMBOL.
Referenced by dsymbol_check(), Init_sym(), and rb_str_intern().
Definition at line 493 of file symbol.c.
References dsymbol_alloc(), ID_SCOPE_MASK, rb_cSymbol, rb_enc_get(), rb_objspace_garbage_object_p(), RSYMBOL, sym, UNLIKELY, and unregister_sym().
Referenced by Init_sym(), lookup_str_sym(), rb_check_symbol(), and rb_sym2id().
FUNC_MINIMIZED | ( | VALUE | rb_sym_internconst char *ptr, long len, rb_encoding *enc | ) |
Referenced by rb_check_symbol_cstr().
FUNC_MINIMIZED | ( | VALUE | rb_sym_intern_cstrconst char *ptr, rb_encoding *enc | ) |
FUNC_MINIMIZED | ( | VALUE | rb_sym_intern_asciiconst char *ptr, long len | ) |
FUNC_MINIMIZED | ( | VALUE | rb_sym_intern_ascii_cstrconst char *ptr | ) |
|
static |
Definition at line 341 of file symbol.c.
References global_symbols, ID_ENTRY_SIZE, ID_ENTRY_UNIT, symbols::ids, symbols::last_id, NIL_P, RARRAY_LEN, rb_ary_entry(), and result.
Referenced by lookup_id_str(), rb_id2sym(), and rb_id_serial_to_id().
|
static |
Definition at line 38 of file symbol.c.
References ISALNUM, name, op_tbl, op_tbl_count, op_tbl_len, rb_usascii_encoding(), register_static_symid(), and token.
Referenced by Init_sym().
void Init_sym | ( | void | ) |
Definition at line 75 of file symbol.c.
References attrsetname_to_attr(), attrsetname_to_attr_id(), dsymbol_alloc(), dsymbol_check(), symbols::dsymbol_fstr_hash, global_symbols, symbols::ids, Init_id(), Init_op_tbl(), intern_str(), lookup_id_str(), lookup_str_id(), lookup_str_sym(), name, rb_ary_tmp_new(), rb_gc_register_mark_object(), rb_ident_hash_new(), rb_obj_hide(), st_init_table_with_size, symbols::str_sym, sym, and WARN_UNUSED_RESULT().
Definition at line 582 of file symbol.c.
References id, ID_JUNK, ID_STATIC_SYM, IDSET_ATTRSET_FOR_INTERN, next_id_base(), nid, PRIsVALUE, rb_enc_associate(), rb_eRuntimeError, rb_raise(), rb_str_dup(), rb_str_ellipsize(), rb_str_symname_type(), rb_usascii_encoding(), register_static_symid_str(), and sym_check_asciionly().
Referenced by Init_sym(), rb_id_attrset(), rb_intern3(), rb_intern_str(), and rb_str_intern().
|
static |
Definition at line 164 of file symbol.c.
References is_global_name_punct(), is_identchar, ISASCII, ISDIGIT, and rb_enc_mbclen().
Referenced by rb_enc_symname_type().
Definition at line 548 of file symbol.c.
References get_id_entry(), ID_ENTRY_STR, and rb_id_to_serial().
Referenced by Init_sym(), rb_id2str(), rb_id_attrset(), and sym_check_asciionly().
Definition at line 509 of file symbol.c.
References DYNAMIC_SYM_P, global_symbols, id, ID_SCOPE_MASK, PRIsVALUE, PRIxVALUE, rb_bug(), rb_builtin_class_name(), RSYMBOL, st_data_t, st_lookup, STATIC_SYM2ID, STATIC_SYM_P, and symbols::str_sym.
Referenced by attrsetname_to_attr_id(), Init_sym(), rb_check_id(), and rb_check_id_cstr().
Definition at line 531 of file symbol.c.
References dsymbol_check(), DYNAMIC_SYM_P, global_symbols, st_data_t, st_lookup, symbols::str_sym, and sym.
Referenced by Init_sym(), rb_check_symbol(), rb_check_symbol_cstr(), rb_id_attrset(), rb_intern3(), rb_intern_str(), and rb_str_intern().
|
static |
Definition at line 568 of file symbol.c.
References global_symbols, ID_SCOPE_SHIFT, and symbols::last_id.
Referenced by intern_str(), rb_make_internal_id(), and rb_sym2id().
Returns ID for the given name if it is interned already, or 0.
namep | the pointer to the name object |
namep
must be a Symbol or a String, or possible to convert with to_str method. namep
is a Symbol or a String if non-zero value is returned, or is a String if 0 is returned. Definition at line 923 of file symbol.c.
References DYNAMIC_SYM_P, lookup_str_id(), name, NIL_P, PRIsVALUE, rb_check_string_type(), rb_eTypeError, rb_raise(), RB_TYPE_P, RSYMBOL, STATIC_SYM2ID, STATIC_SYM_P, sym_check_asciionly(), SYMBOL_PINNED_P, and T_STRING.
Referenced by check_definition(), check_exec_redirect(), check_exec_redirect_fd(), check_id_type(), check_local_id(), check_setter_id(), classname(), enum_inject(), iseq_type_from_sym(), obj_method(), obj_respond_to(), rb_execarg_addopt(), rb_f_send(), rb_f_untrace_var(), rb_mod_alias_method(), rb_mod_autoload_p(), rb_mod_const_defined(), rb_mod_const_get(), rb_mod_define_method(), rb_mod_instance_method(), rb_mod_method_defined(), rb_mod_public_instance_method(), rb_mod_remove_method(), rb_mod_undef_method(), rb_obj_singleton_method(), rb_thread_aref(), rb_thread_key_p(), rb_thread_variable_p(), send_internal(), set_const_visibility(), set_method_visibility(), and vm_call_opt_send().
ID rb_check_id_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 992 of file symbol.c.
References lookup_str_id(), rb_setup_fake_str(), and sym_check_asciionly().
Referenced by rb_deprecate_constant(), rb_mod_const_defined(), rb_mod_const_get(), and rb_path_to_class().
Definition at line 956 of file symbol.c.
References dsymbol_check(), DYNAMIC_SYM_P, lookup_str_sym(), name, NIL_P, PRIsVALUE, Qnil, rb_check_string_type(), rb_eTypeError, rb_raise(), RB_TYPE_P, STATIC_SYM_P, sym, sym_check_asciionly(), SYMBOL_PINNED_P, and T_STRING.
Referenced by fole_missing(), and rb_struct_pos().
VALUE rb_check_symbol_cstr | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 1003 of file symbol.c.
References FUNC_MINIMIZED(), len, lookup_str_sym(), NOINLINE, RString::ptr, Qnil, rb_setup_fake_str(), rb_sym_intern(), rb_sym_intern_ascii(), rb_sym_intern_ascii_cstr(), rb_sym_intern_cstr(), sym, and sym_check_asciionly().
Referenced by rb_str_format().
int rb_enc_symname2_p | ( | const char * | name, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 311 of file symbol.c.
References IDSET_ATTRSET_FOR_SYNTAX, and rb_enc_symname_type().
Referenced by rb_enc_symname_p(), and reg_named_capture_assign_iter().
int rb_enc_symname_p | ( | const char * | name, |
rb_encoding * | enc | ||
) |
Definition at line 196 of file symbol.c.
References rb_enc_symname2_p(), and strlen().
Referenced by rb_str_symname_p(), and rb_symname_p().
|
static |
Definition at line 205 of file symbol.c.
References id, ID_ATTRSET, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_JUNK, ID_LOCAL, is_identchar, is_special_global_name(), ISALPHA, ISASCII, ISUPPER, len, name, rb_enc_asciicompat, and rb_enc_mbclen().
Referenced by rb_enc_symname2_p(), and rb_str_symname_type().
void rb_gc_free_dsymbol | ( | VALUE | sym | ) |
Definition at line 629 of file symbol.c.
References symbols::dsymbol_fstr_hash, global_symbols, rb_hash_delete_entry(), RSYMBOL, and unregister_sym().
Referenced by obj_free().
Definition at line 759 of file symbol.c.
References rb_id2str(), and RSTRING_PTR.
Referenced by add_opt_method(), addrinfo_inspect(), control_frame_dump(), dump_object(), extract_user_token(), hash_table_extend(), ibf_dump_id_list_i(), inspect_errno(), list_table_extend(), method_definition_addref(), method_definition_addref_complement(), num_funcall_op_0(), num_funcall_op_1_recursion(), racc_yyparse(), rb_method_definition_release(), rb_method_entry_make(), rb_raw_obj_info(), rb_undef(), remove_method(), rsock_inspect_sockaddr(), rsock_revlookup_flag(), ruby_debug_print_id(), ruby_th_dtrace_setup(), sockopt_inspect(), and void_expr_gen().
Definition at line 745 of file symbol.c.
References lookup_id_str(), rb_cString, RBASIC, and RBASIC_SET_CLASS_RAW.
Referenced by rb_id2name(), rb_id_attrget(), rb_id_attrset(), and rb_sym2str().
Definition at line 726 of file symbol.c.
References DYNAMIC_ID_P, get_id_entry(), ID_ENTRY_SYM, rb_id_to_serial(), and STATIC_ID2SYM.
Definition at line 158 of file symbol.c.
References attrsetname_to_attr(), and rb_id2str().
Definition at line 100 of file symbol.c.
References id, ID_ATTRSET, ID_CLASS, ID_CONST, ID_GLOBAL, ID_INSTANCE, ID_JUNK, ID_LOCAL, id_type(), id_types, intern_str(), is_notop_id, lookup_id_str(), lookup_str_sym(), PRIsVALUE, PRIxVALUE, Qnil, rb_id2str(), rb_name_error(), rb_name_error_str(), rb_str_cat(), rb_str_dup(), rb_sym2id(), sym, tAREF, and tASET.
Referenced by attrset_gen(), iseq_compile_each(), rb_attr(), and setup_struct().
|
inlinestatic |
Definition at line 359 of file symbol.c.
References get_id_entry(), ID_ENTRY_SYM, is_notop_id, key, PRIsVALUE, PRIxVALUE, rb_fatal(), ST_CONTINUE, st_data_t, and SYM2ID.
Referenced by key2id().
Definition at line 611 of file symbol.c.
References rb_intern2(), and strlen().
Definition at line 604 of file symbol.c.
References rb_intern3(), and rb_usascii_encoding().
Referenced by global_id(), init_constants(), Init_load(), parse_ident(), parser_compile_error(), rb_f_global_variables(), rb_intern(), and yyparse().
ID rb_intern3 | ( | const char * | name, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 554 of file symbol.c.
References intern_str(), lookup_str_sym(), OBJ_FREEZE, rb_enc_str_new(), rb_setup_fake_str(), rb_sym2id(), and sym.
Referenced by rb_intern2().
Definition at line 617 of file symbol.c.
References intern_str(), lookup_str_sym(), and SYM2ID.
int rb_is_attrset_id | ( | ID | id | ) |
Definition at line 852 of file symbol.c.
References is_attrset_id.
Referenced by iseq_compile_each().
int rb_is_attrset_name | ( | VALUE | name | ) |
Definition at line 1108 of file symbol.c.
References ID_ATTRSET, IDSET_ATTRSET_FOR_INTERN, and rb_str_symname_type().
Referenced by attrsetname_to_attr().
int rb_is_attrset_sym | ( | VALUE | sym | ) |
Definition at line 894 of file symbol.c.
References is_attrset_sym.
int rb_is_class_id | ( | ID | id | ) |
Definition at line 834 of file symbol.c.
References is_class_id.
Referenced by cv_i(), and cv_intern().
int rb_is_class_name | ( | VALUE | name | ) |
Definition at line 1090 of file symbol.c.
References ID_CLASS, and rb_str_symname_type().
int rb_is_class_sym | ( | VALUE | sym | ) |
Definition at line 876 of file symbol.c.
References is_class_sym.
int rb_is_const_id | ( | ID | id | ) |
Definition at line 828 of file symbol.c.
References is_const_id.
Referenced by defined_expr(), fc_i(), inspect_struct(), iseq_compile_each(), ole_const_load(), rb_autoload_str(), rb_define_const(), rb_is_attr_id(), rb_local_constants_i(), rb_mod_const_defined(), rb_mod_const_get(), and sv_i().
int rb_is_const_name | ( | VALUE | name | ) |
Definition at line 1084 of file symbol.c.
References ID_CONST, and rb_str_symname_type().
Referenced by new_struct(), rb_is_attr_name(), rb_mod_const_defined(), and rb_mod_const_get().
int rb_is_const_sym | ( | VALUE | sym | ) |
Definition at line 870 of file symbol.c.
References is_const_sym.
Referenced by rb_mod_const_defined(), and rb_mod_const_get().
int rb_is_global_id | ( | ID | id | ) |
Definition at line 840 of file symbol.c.
References is_global_id.
int rb_is_global_name | ( | VALUE | name | ) |
Definition at line 1096 of file symbol.c.
References ID_GLOBAL, and rb_str_symname_type().
int rb_is_global_sym | ( | VALUE | sym | ) |
Definition at line 882 of file symbol.c.
References is_global_sym.
int rb_is_instance_id | ( | ID | id | ) |
Definition at line 846 of file symbol.c.
References is_instance_id.
Referenced by inspect_i(), and ivar_i().
int rb_is_instance_name | ( | VALUE | name | ) |
Definition at line 1102 of file symbol.c.
References ID_INSTANCE, and rb_str_symname_type().
int rb_is_instance_sym | ( | VALUE | sym | ) |
Definition at line 888 of file symbol.c.
References is_instance_sym.
int rb_is_junk_id | ( | ID | id | ) |
Definition at line 864 of file symbol.c.
References is_junk_id.
int rb_is_junk_name | ( | VALUE | name | ) |
Definition at line 1130 of file symbol.c.
References IDSET_ATTRSET_FOR_SYNTAX, and rb_str_symname_type().
int rb_is_junk_sym | ( | VALUE | sym | ) |
Definition at line 906 of file symbol.c.
References is_junk_sym.
int rb_is_local_id | ( | ID | id | ) |
Definition at line 858 of file symbol.c.
References is_local_id.
Referenced by check_local_id(), inspect_struct(), local_var_list_add(), and rb_is_attr_id().
int rb_is_local_name | ( | VALUE | name | ) |
Definition at line 1114 of file symbol.c.
References ID_LOCAL, and rb_str_symname_type().
Referenced by check_local_id(), and rb_is_attr_name().
int rb_is_local_sym | ( | VALUE | sym | ) |
Definition at line 900 of file symbol.c.
References is_local_sym.
int rb_is_method_name | ( | VALUE | name | ) |
Definition at line 1120 of file symbol.c.
References FALSE, ID_ATTRSET, ID_JUNK, ID_LOCAL, rb_str_symname_type(), and TRUE.
ID rb_make_internal_id | ( | void | ) |
Definition at line 768 of file symbol.c.
References ID_INTERNAL, ID_STATIC_SYM, and next_id_base().
Referenced by Init_Exception(), and Init_pack().
Definition at line 661 of file symbol.c.
References dsymbol_alloc(), id, ID2SYM, ID_JUNK, IDSET_ATTRSET_FOR_INTERN, intern_str(), lookup_str_sym(), OBJ_FREEZE, rb_cSymbol, rb_enc_associate(), rb_enc_get(), rb_fstring(), rb_str_dup(), rb_str_new_frozen(), rb_str_symname_type(), rb_usascii_encoding(), sym, and sym_check_asciionly().
Referenced by hash2ptr_dispparams(), hash2result(), Init_String(), JSON_parse_string(), r_object0(), rb_f_global_variables(), rb_mod_const_get(), rb_set_class_path(), rb_set_class_path_string(), rb_sym_intern(), rb_to_symbol(), register_label(), send_internal(), set_state_ivars(), sym_capitalize(), sym_downcase(), sym_each_i(), sym_step_i(), sym_succ(), sym_swapcase(), sym_upcase(), vm_call_opt_send(), w_unique(), and yyparse().
|
static |
Definition at line 317 of file symbol.c.
References len, rb_enc_get(), rb_enc_symname_type(), RB_GC_GUARD, RSTRING_LEN, and StringValuePtr.
Referenced by intern_str(), rb_is_attrset_name(), rb_is_class_name(), rb_is_const_name(), rb_is_global_name(), rb_is_instance_name(), rb_is_junk_name(), rb_is_local_name(), rb_is_method_name(), and rb_str_intern().
Definition at line 698 of file symbol.c.
References dsymbol_check(), symbols::dsymbol_fstr_hash, DYNAMIC_SYM_P, global_symbols, id, ID_SCOPE_MASK, next_id_base(), rb_builtin_class_name(), rb_eTypeError, rb_hash_delete_entry(), rb_id_to_serial(), rb_raise(), RSYMBOL, set_id_entry(), STATIC_SYM2ID, STATIC_SYM_P, and UNLIKELY.
Referenced by rb_id_attrset(), and rb_intern3().
Definition at line 734 of file symbol.c.
References DYNAMIC_SYM_P, rb_id2str(), RSYMBOL, and STATIC_SYM2ID.
VALUE rb_sym_all_symbols | ( | void | ) |
Definition at line 814 of file symbol.c.
References RString::ary, global_symbols, st_table::num_entries, rb_ary_new2, st_foreach, symbols::str_sym, and symbols_i().
Referenced by Init_String().
size_t rb_sym_immortal_count | ( | void | ) |
Definition at line 822 of file symbol.c.
References global_symbols, and symbols::last_id.
Referenced by count_symbols(), cs_i(), and is_global_name_punct().
VALUE rb_sym_intern | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 1030 of file symbol.c.
References rb_setup_fake_str(), and rb_str_intern().
Referenced by rb_check_symbol_cstr(), rb_str_format(), rb_sym_intern_ascii(), and rb_sym_intern_cstr().
Definition at line 1044 of file symbol.c.
References rb_sym_intern(), and rb_usascii_encoding().
Referenced by rb_check_symbol_cstr(), and rb_sym_intern_ascii_cstr().
Definition at line 1050 of file symbol.c.
References rb_sym_intern_ascii(), and strlen().
Referenced by rb_catch(), rb_check_symbol_cstr(), rb_throw(), struct_make_members_list(), and yycompile0().
VALUE rb_sym_intern_cstr | ( | const char * | ptr, |
rb_encoding * | enc | ||
) |
Definition at line 1038 of file symbol.c.
References rb_sym_intern(), and strlen().
Referenced by rb_check_symbol_cstr().
int rb_symname_p | ( | const char * | name | ) |
Definition at line 190 of file symbol.c.
References rb_ascii8bit_encoding(), and rb_enc_symname_p().
|
static |
Definition at line 404 of file symbol.c.
References rb_enc_str_new(), and register_static_symid_str().
Referenced by Init_op_tbl().
Definition at line 411 of file symbol.c.
References id, OBJ_FREEZE, rb_fstring(), rb_id_to_serial(), register_sym(), RSTRING_PTR, RUBY_DTRACE_CREATE_HOOK, set_id_entry(), and STATIC_ID2SYM.
Referenced by intern_str(), and register_static_symid().
Definition at line 384 of file symbol.c.
References global_symbols, st_add_direct, st_data_t, st_update(), and symbols::str_sym.
Referenced by dsymbol_alloc(), and register_static_symid_str().
|
static |
Definition at line 327 of file symbol.c.
References global_symbols, ID_ENTRY_SIZE, ID_ENTRY_STR, ID_ENTRY_SYM, ID_ENTRY_UNIT, symbols::ids, NIL_P, RARRAY_LEN, rb_ary_entry(), rb_ary_store(), and rb_ary_tmp_new().
Referenced by rb_sym2id(), and register_static_symid_str().
|
static |
Definition at line 428 of file symbol.c.
References DYNAMIC_SYM_P, ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, FALSE, lookup_id_str(), PRIsVALUE, rb_bug(), rb_builtin_class_name(), rb_eEncodingError, rb_enc_asciicompat, rb_enc_get(), rb_enc_name, rb_enc_str_coderange(), rb_raise(), RSTRING_PTR, RUBY_SPECIAL_SHIFT, STATIC_SYM_P, TRUE, and UNLIKELY.
Referenced by intern_str(), rb_check_id(), rb_check_id_cstr(), rb_check_symbol(), rb_check_symbol_cstr(), and rb_str_intern().
Definition at line 774 of file symbol.c.
References RString::ary, DYNAMIC_SYM_P, rb_ary_push(), rb_bug(), rb_objspace_garbage_object_p(), RSTRING_PTR, RSYMBOL, ST_CONTINUE, ST_DELETE, STATIC_SYM_P, and SYMBOL_PINNED_P.
Referenced by rb_sym_all_symbols().
Definition at line 395 of file symbol.c.
References global_symbols, NULL, rb_bug(), RSTRING_PTR, st_data_t, st_delete, and symbols::str_sym.
Referenced by dsymbol_check(), and rb_gc_free_dsymbol().
WARN_UNUSED_RESULT | ( | static VALUE | dsymbol_allocconst VALUE klass, const VALUE str, rb_encoding *const enc, const ID type | ) |
Referenced by Init_sym().
WARN_UNUSED_RESULT | ( | static VALUE | dsymbol_checkconst VALUE sym | ) |
WARN_UNUSED_RESULT | ( | static ID | lookup_str_idVALUE str | ) |
WARN_UNUSED_RESULT | ( | static VALUE | lookup_str_symconst VALUE str | ) |
WARN_UNUSED_RESULT | ( | static VALUE | lookup_id_strID id | ) |
WARN_UNUSED_RESULT | ( | static ID | attrsetname_to_attrVALUE name | ) |
WARN_UNUSED_RESULT | ( | static ID | intern_strVALUE str, int mutable | ) |
|
static |