13 #define RUBY_SYMBOL_H 1 17 #define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID) 18 #define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG) 20 #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P 21 #define rb_id2sym(id) \ 22 RB_GNUC_EXTENSION_BLOCK(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \ 23 STATIC_ID2SYM(id) : rb_id2sym(id)) 33 #define RSYMBOL(obj) (R_CAST(RSymbol)(obj)) 35 #define is_notop_id(id) ((id)>tLAST_OP_ID) 36 #define is_local_id(id) (id_type(id)==ID_LOCAL) 37 #define is_global_id(id) (id_type(id)==ID_GLOBAL) 38 #define is_instance_id(id) (id_type(id)==ID_INSTANCE) 39 #define is_attrset_id(id) ((id)==idASET||id_type(id)==ID_ATTRSET) 40 #define is_const_id(id) (id_type(id)==ID_CONST) 41 #define is_class_id(id) (id_type(id)==ID_CLASS) 42 #define is_junk_id(id) (id_type(id)==ID_JUNK) 58 rb_id_to_serial(
ID id)
84 #define is_local_sym(sym) (sym_type(sym)==ID_LOCAL) 85 #define is_global_sym(sym) (sym_type(sym)==ID_GLOBAL) 86 #define is_instance_sym(sym) (sym_type(sym)==ID_INSTANCE) 87 #define is_attrset_sym(sym) (sym_type(sym)==ID_ATTRSET) 88 #define is_const_sym(sym) (sym_type(sym)==ID_CONST) 89 #define is_class_sym(sym) (sym_type(sym)==ID_CLASS) 90 #define is_junk_sym(sym) (sym_type(sym)==ID_JUNK) 95 is_global_name_punct(
const int c)
97 if (c <= 0x20 || 0x7e < c)
return 0;
RUBY_SYMBOL_EXPORT_BEGIN size_t rb_sym_immortal_count(void)
#define RUBY_FUNC_EXPORTED
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
#define RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_BEGIN
ID rb_intern_cstr_without_pindown(const char *, long, rb_encoding *)