Ruby  2.5.0dev(2017-10-22revision60238)
Data Structures | Macros | Typedefs | Functions | Variables
symbol.h File Reference
#include "id.h"

Go to the source code of this file.

Data Structures

struct  RSymbol
 

Macros

#define DYNAMIC_ID_P(id)   (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)
 
#define STATIC_ID2SYM(id)   (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
 
#define RSYMBOL(obj)   (R_CAST(RSymbol)(obj))
 
#define is_notop_id(id)   ((id)>tLAST_OP_ID)
 
#define is_local_id(id)   (id_type(id)==ID_LOCAL)
 
#define is_global_id(id)   (id_type(id)==ID_GLOBAL)
 
#define is_instance_id(id)   (id_type(id)==ID_INSTANCE)
 
#define is_attrset_id(id)   ((id)==idASET||id_type(id)==ID_ATTRSET)
 
#define is_const_id(id)   (id_type(id)==ID_CONST)
 
#define is_class_id(id)   (id_type(id)==ID_CLASS)
 
#define is_junk_id(id)   (id_type(id)==ID_JUNK)
 
#define is_local_sym(sym)   (sym_type(sym)==ID_LOCAL)
 
#define is_global_sym(sym)   (sym_type(sym)==ID_GLOBAL)
 
#define is_instance_sym(sym)   (sym_type(sym)==ID_INSTANCE)
 
#define is_attrset_sym(sym)   (sym_type(sym)==ID_ATTRSET)
 
#define is_const_sym(sym)   (sym_type(sym)==ID_CONST)
 
#define is_class_sym(sym)   (sym_type(sym)==ID_CLASS)
 
#define is_junk_sym(sym)   (sym_type(sym)==ID_JUNK)
 

Typedefs

typedef uint32_t rb_id_serial_t
 

Functions

ID rb_intern_cstr_without_pindown (const char *, long, rb_encoding *)
 
RUBY_SYMBOL_EXPORT_BEGIN size_t rb_sym_immortal_count (void)
 

Variables

RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits [(0x7e - 0x20+31)/32]
 

Macro Definition Documentation

◆ DYNAMIC_ID_P

#define DYNAMIC_ID_P (   id)    (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)

Definition at line 17 of file symbol.h.

Referenced by rb_id2sym().

◆ is_attrset_id

#define is_attrset_id (   id)    ((id)==idASET||id_type(id)==ID_ATTRSET)

Definition at line 39 of file symbol.h.

Referenced by rb_is_attrset_id().

◆ is_attrset_sym

#define is_attrset_sym (   sym)    (sym_type(sym)==ID_ATTRSET)

Definition at line 87 of file symbol.h.

Referenced by rb_is_attrset_sym().

◆ is_class_id

#define is_class_id (   id)    (id_type(id)==ID_CLASS)

Definition at line 41 of file symbol.h.

Referenced by rb_is_class_id().

◆ is_class_sym

#define is_class_sym (   sym)    (sym_type(sym)==ID_CLASS)

Definition at line 89 of file symbol.h.

Referenced by rb_is_class_sym().

◆ is_const_id

#define is_const_id (   id)    (id_type(id)==ID_CONST)

Definition at line 40 of file symbol.h.

Referenced by rb_is_const_id().

◆ is_const_sym

#define is_const_sym (   sym)    (sym_type(sym)==ID_CONST)

Definition at line 88 of file symbol.h.

Referenced by rb_is_const_sym().

◆ is_global_id

#define is_global_id (   id)    (id_type(id)==ID_GLOBAL)

Definition at line 37 of file symbol.h.

Referenced by rb_is_global_id().

◆ is_global_sym

#define is_global_sym (   sym)    (sym_type(sym)==ID_GLOBAL)

Definition at line 85 of file symbol.h.

Referenced by rb_is_global_sym().

◆ is_instance_id

#define is_instance_id (   id)    (id_type(id)==ID_INSTANCE)

Definition at line 38 of file symbol.h.

Referenced by rb_is_instance_id().

◆ is_instance_sym

#define is_instance_sym (   sym)    (sym_type(sym)==ID_INSTANCE)

Definition at line 86 of file symbol.h.

Referenced by rb_is_instance_sym().

◆ is_junk_id

#define is_junk_id (   id)    (id_type(id)==ID_JUNK)

Definition at line 42 of file symbol.h.

Referenced by rb_is_junk_id().

◆ is_junk_sym

#define is_junk_sym (   sym)    (sym_type(sym)==ID_JUNK)

Definition at line 90 of file symbol.h.

Referenced by rb_is_junk_sym().

◆ is_local_id

#define is_local_id (   id)    (id_type(id)==ID_LOCAL)

Definition at line 36 of file symbol.h.

Referenced by rb_is_local_id().

◆ is_local_sym

#define is_local_sym (   sym)    (sym_type(sym)==ID_LOCAL)

Definition at line 84 of file symbol.h.

Referenced by rb_is_local_sym().

◆ is_notop_id

#define is_notop_id (   id)    ((id)>tLAST_OP_ID)

Definition at line 35 of file symbol.h.

Referenced by rb_id_attrset().

◆ RSYMBOL

#define RSYMBOL (   obj)    (R_CAST(RSymbol)(obj))

Definition at line 33 of file symbol.h.

Referenced by rb_check_id(), rb_gc_free_dsymbol(), and rb_sym2str().

◆ STATIC_ID2SYM

#define STATIC_ID2SYM (   id)    (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)

Definition at line 18 of file symbol.h.

Referenced by rb_id2sym().

Typedef Documentation

◆ rb_id_serial_t

Definition at line 55 of file symbol.h.

Function Documentation

◆ rb_intern_cstr_without_pindown()

ID rb_intern_cstr_without_pindown ( const char *  ,
long  ,
rb_encoding  
)

◆ rb_sym_immortal_count()

RUBY_SYMBOL_EXPORT_BEGIN size_t rb_sym_immortal_count ( void  )

Definition at line 814 of file symbol.c.

Variable Documentation

◆ ruby_global_name_punct_bits

RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]

Definition at line 92 of file symbol.h.