Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
#include "ruby/internal/config.h"
#include "ruby/internal/attr/nonnull.h"
#include "ruby/internal/attr/pure.h"
#include "ruby/internal/attr/noalias.h"
#include "ruby/internal/cast.h"
#include "ruby/internal/constant_p.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/has/builtin.h"
#include "ruby/internal/value.h"
Go to the source code of this file.
Macros | |
#define | RB_ID2SYM rb_id2sym |
#define | RB_SYM2ID rb_sym2id |
#define | ID2SYM RB_ID2SYM |
#define | SYM2ID RB_SYM2ID |
#define | CONST_ID_CACHE RUBY_CONST_ID_CACHE |
#define | CONST_ID RUBY_CONST_ID |
#define | RUBY_CONST_ID_CACHE(result, str) |
#define | RUBY_CONST_ID(var, str) |
Functions | |
ID | rb_sym2id (VALUE) |
VALUE | rb_id2sym (ID) |
ID | rb_intern (const char *) |
ID | rb_intern2 (const char *, long) |
ID | rb_intern_str (VALUE str) |
const char * | rb_id2name (ID) |
ID | rb_check_id (volatile VALUE *) |
Returns ID for the given name if it is interned already, or 0. More... | |
ID | rb_to_id (VALUE) |
VALUE | rb_id2str (ID) |
VALUE | rb_sym2str (VALUE) |
VALUE | rb_to_symbol (VALUE name) |
VALUE | rb_check_symbol (volatile VALUE *namep) |
Returns Symbol for the given name if it is interned already, or nil. More... | |
Defines rb_intern.
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 symbol.h.
#define CONST_ID RUBY_CONST_ID |
#define CONST_ID_CACHE RUBY_CONST_ID_CACHE |
#define RUBY_CONST_ID | ( | var, | |
str | |||
) |
#define RUBY_CONST_ID_CACHE | ( | result, | |
str | |||
) |
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 1069 of file symbol.c.
References DYNAMIC_SYM_P, name, NIL_P, PRIsVALUE, rb_check_string_type(), rb_eTypeError, rb_raise(), RSYMBOL, STATIC_SYM2ID, STATIC_SYM_P, SYMBOL_PINNED_P, and T_STRING.
Referenced by rb_execarg_addopt(), rb_f_untrace_var(), and rb_obj_singleton_method().
Returns Symbol for the given name if it is interned already, or nil.
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-nil value is returned, or is a String if nil is returned. Definition at line 1114 of file symbol.c.
References DYNAMIC_SYM_P, GLOBAL_SYMBOLS_ENTER, GLOBAL_SYMBOLS_LEAVE, name, NIL_P, PRIsVALUE, Qnil, rb_check_string_type(), rb_eTypeError, rb_raise(), STATIC_SYM_P, sym, SYMBOL_PINNED_P, and T_STRING.
Definition at line 944 of file symbol.c.
References rb_id2str, RSTRING_PTR, and str.
Referenced by rb_dtrace_setup(), rb_raw_obj_info(), rb_undef(), rsock_inspect_sockaddr(), rsock_revlookup_flag(), and ruby_debug_print_id().
Definition at line 919 of file symbol.c.
References DYNAMIC_ID_P, ID_ENTRY_SYM, and STATIC_ID2SYM.
Definition at line 785 of file symbol.c.
References name, rb_intern2(), and strlen().
Referenced by asn1time_to_time(), create_win32ole_param(), create_win32ole_variable(), default_inspect(), DupConfigPtr(), EVENTSINK_Invoke(), Init_bubblebabble(), Init_console(), Init_digest(), Init_fiddle(), Init_fiddle_pointer(), Init_GC(), Init_generator(), Init_objspace(), Init_openssl(), Init_ossl_asn1(), Init_ossl_ec(), Init_ossl_pkcs12(), Init_ossl_pkcs7(), Init_ossl_pkey(), Init_ossl_x509ext(), Init_ossl_x509name(), Init_ossl_x509store(), Init_parser(), Init_Proc(), Init_psych_emitter(), Init_psych_parser(), Init_Random(), Init_readline(), Init_socket(), Init_stringio(), Init_strscan(), Init_Struct(), Init_syslog(), Init_transcode(), Init_win32ole_event(), Init_win32ole_variant(), Init_zlib(), InitVM_pathname(), olerecord_set_ivar(), ossl_obj2bio(), ossl_time_split(), rb_big_remainder(), rb_callable_receiver(), rb_define_alias(), rb_define_attr(), rb_define_class(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_module(), rb_define_module_under(), rb_define_private_method(), rb_define_protected_method(), rb_enc_get_index(), rb_fiddle_generic_to_value(), rb_gvar_ractor_local(), rb_iseq_add_local_tracepoint_recursively(), rb_iseq_load_iseq(), rb_iv_set(), rb_range_values(), rb_rational_cmp(), rb_rational_pow(), rb_remove_method(), rb_resolve_feature_path(), rb_time_zone_abbreviation(), rb_undef_method(), rsock_init_addrinfo(), rsock_init_ancdata(), and rsock_init_socket_init().
Definition at line 778 of file symbol.c.
References len, name, rb_intern3(), and rb_usascii_encoding().
Referenced by Init_load(), rb_f_global_variables(), rb_intern(), and yyparse().
Definition at line 885 of file symbol.c.
References rb_symbols_t::dsymbol_fstr_hash, DYNAMIC_SYM_P, GLOBAL_SYMBOLS_ENTER, GLOBAL_SYMBOLS_LEAVE, id, ID_SCOPE_MASK, num, rb_builtin_class_name(), rb_eTypeError, rb_hash_delete_entry(), rb_raise(), RSYMBOL, STATIC_SYM2ID, STATIC_SYM_P, sym, and UNLIKELY.
Referenced by rb_fiddle_type_ensure(), rb_id_attrset(), and rb_intern3().
Definition at line 927 of file symbol.c.
References DYNAMIC_SYM_P, rb_id2str, RSYMBOL, STATIC_SYM2ID, and sym.
Referenced by Init_String(), rb_enc_get_index(), rb_num_get_rounding_option(), rb_reg_match_p(), rb_str_format(), and rb_sym_to_s().
Definition at line 11501 of file string.c.
References name, rb_intern_str, SYM2ID, and SYMBOL_P.
Referenced by rb_f_trace_var().
Definition at line 11511 of file string.c.
References name, rb_str_intern(), and SYMBOL_P.
Referenced by rb_fiddle_type_ensure().