Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Macros | Enumerations | Functions
value_type.h File Reference

Defines enum ruby_value_type. More...

#include "ruby/internal/assume.h"
#include "ruby/internal/attr/artificial.h"
#include "ruby/internal/attr/cold.h"
#include "ruby/internal/attr/enum_extensibility.h"
#include "ruby/internal/attr/forceinline.h"
#include "ruby/internal/attr/pure.h"
#include "ruby/internal/cast.h"
#include "ruby/internal/constant_p.h"
#include "ruby/internal/core/rbasic.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/has/builtin.h"
#include "ruby/internal/special_consts.h"
#include "ruby/internal/stdbool.h"
#include "ruby/internal/value.h"
#include "ruby/assert.h"

Go to the source code of this file.

Macros

#define T_ARRAY   RUBY_T_ARRAY
 
#define T_BIGNUM   RUBY_T_BIGNUM
 
#define T_CLASS   RUBY_T_CLASS
 
#define T_COMPLEX   RUBY_T_COMPLEX
 
#define T_DATA   RUBY_T_DATA
 
#define T_FALSE   RUBY_T_FALSE
 
#define T_FILE   RUBY_T_FILE
 
#define T_FIXNUM   RUBY_T_FIXNUM
 
#define T_FLOAT   RUBY_T_FLOAT
 
#define T_HASH   RUBY_T_HASH
 
#define T_ICLASS   RUBY_T_ICLASS
 
#define T_IMEMO   RUBY_T_IMEMO
 
#define T_MASK   RUBY_T_MASK
 
#define T_MATCH   RUBY_T_MATCH
 
#define T_MODULE   RUBY_T_MODULE
 
#define T_MOVED   RUBY_T_MOVED
 
#define T_NIL   RUBY_T_NIL
 
#define T_NODE   RUBY_T_NODE
 
#define T_NONE   RUBY_T_NONE
 
#define T_OBJECT   RUBY_T_OBJECT
 
#define T_RATIONAL   RUBY_T_RATIONAL
 
#define T_REGEXP   RUBY_T_REGEXP
 
#define T_STRING   RUBY_T_STRING
 
#define T_STRUCT   RUBY_T_STRUCT
 
#define T_SYMBOL   RUBY_T_SYMBOL
 
#define T_TRUE   RUBY_T_TRUE
 
#define T_UNDEF   RUBY_T_UNDEF
 
#define T_ZOMBIE   RUBY_T_ZOMBIE
 
#define BUILTIN_TYPE   RB_BUILTIN_TYPE
 
#define DYNAMIC_SYM_P   RB_DYNAMIC_SYM_P
 
#define RB_INTEGER_TYPE_P   rb_integer_type_p
 
#define SYMBOL_P   RB_SYMBOL_P
 
#define rb_type_p   RB_TYPE_P
 
#define TYPE(_)   RBIMPL_CAST((int)rb_type(_))
 

Enumerations

enum  ruby_value_type {
  RUBY_T_NONE = 0x00 , RUBY_T_OBJECT = 0x01 , RUBY_T_CLASS = 0x02 , RUBY_T_MODULE = 0x03 ,
  RUBY_T_FLOAT = 0x04 , RUBY_T_STRING = 0x05 , RUBY_T_REGEXP = 0x06 , RUBY_T_ARRAY = 0x07 ,
  RUBY_T_HASH = 0x08 , RUBY_T_STRUCT = 0x09 , RUBY_T_BIGNUM = 0x0a , RUBY_T_FILE = 0x0b ,
  RUBY_T_DATA = 0x0c , RUBY_T_MATCH = 0x0d , RUBY_T_COMPLEX = 0x0e , RUBY_T_RATIONAL = 0x0f ,
  RUBY_T_NIL = 0x11 , RUBY_T_TRUE = 0x12 , RUBY_T_FALSE = 0x13 , RUBY_T_SYMBOL = 0x14 ,
  RUBY_T_FIXNUM = 0x15 , RUBY_T_UNDEF = 0x16 , RUBY_T_IMEMO = 0x1a , RUBY_T_NODE = 0x1b ,
  RUBY_T_ICLASS = 0x1c , RUBY_T_ZOMBIE = 0x1d , RUBY_T_MOVED = 0x1e , RUBY_T_MASK = 0x1f
}
 C-level type of an object. More...
 

Functions

void rb_check_type (VALUE obj, int t)
 

Detailed Description

Defines enum ruby_value_type.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org
Warning
Symbols prefixed with either 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.
Note
To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance __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 value_type.h.

Macro Definition Documentation

◆ BUILTIN_TYPE

#define BUILTIN_TYPE   RB_BUILTIN_TYPE

Definition at line 84 of file value_type.h.

◆ DYNAMIC_SYM_P

#define DYNAMIC_SYM_P   RB_DYNAMIC_SYM_P

Definition at line 85 of file value_type.h.

◆ RB_INTEGER_TYPE_P

#define RB_INTEGER_TYPE_P   rb_integer_type_p

Definition at line 86 of file value_type.h.

◆ rb_type_p

#define rb_type_p   RB_TYPE_P

Definition at line 88 of file value_type.h.

◆ SYMBOL_P

#define SYMBOL_P   RB_SYMBOL_P

Definition at line 87 of file value_type.h.

◆ T_ARRAY

#define T_ARRAY   RUBY_T_ARRAY

Definition at line 55 of file value_type.h.

◆ T_BIGNUM

#define T_BIGNUM   RUBY_T_BIGNUM

Definition at line 56 of file value_type.h.

◆ T_CLASS

#define T_CLASS   RUBY_T_CLASS

Definition at line 57 of file value_type.h.

◆ T_COMPLEX

#define T_COMPLEX   RUBY_T_COMPLEX

Definition at line 58 of file value_type.h.

◆ T_DATA

#define T_DATA   RUBY_T_DATA

Definition at line 59 of file value_type.h.

◆ T_FALSE

#define T_FALSE   RUBY_T_FALSE

Definition at line 60 of file value_type.h.

◆ T_FILE

#define T_FILE   RUBY_T_FILE

Definition at line 61 of file value_type.h.

◆ T_FIXNUM

#define T_FIXNUM   RUBY_T_FIXNUM

Definition at line 62 of file value_type.h.

◆ T_FLOAT

#define T_FLOAT   RUBY_T_FLOAT

Definition at line 63 of file value_type.h.

◆ T_HASH

#define T_HASH   RUBY_T_HASH

Definition at line 64 of file value_type.h.

◆ T_ICLASS

#define T_ICLASS   RUBY_T_ICLASS

Definition at line 65 of file value_type.h.

◆ T_IMEMO

#define T_IMEMO   RUBY_T_IMEMO

Definition at line 66 of file value_type.h.

◆ T_MASK

#define T_MASK   RUBY_T_MASK

Definition at line 67 of file value_type.h.

◆ T_MATCH

#define T_MATCH   RUBY_T_MATCH

Definition at line 68 of file value_type.h.

◆ T_MODULE

#define T_MODULE   RUBY_T_MODULE

Definition at line 69 of file value_type.h.

◆ T_MOVED

#define T_MOVED   RUBY_T_MOVED

Definition at line 70 of file value_type.h.

◆ T_NIL

#define T_NIL   RUBY_T_NIL

Definition at line 71 of file value_type.h.

◆ T_NODE

#define T_NODE   RUBY_T_NODE

Definition at line 72 of file value_type.h.

◆ T_NONE

#define T_NONE   RUBY_T_NONE

Definition at line 73 of file value_type.h.

◆ T_OBJECT

#define T_OBJECT   RUBY_T_OBJECT

Definition at line 74 of file value_type.h.

◆ T_RATIONAL

#define T_RATIONAL   RUBY_T_RATIONAL

Definition at line 75 of file value_type.h.

◆ T_REGEXP

#define T_REGEXP   RUBY_T_REGEXP

Definition at line 76 of file value_type.h.

◆ T_STRING

#define T_STRING   RUBY_T_STRING

Definition at line 77 of file value_type.h.

◆ T_STRUCT

#define T_STRUCT   RUBY_T_STRUCT

Definition at line 78 of file value_type.h.

◆ T_SYMBOL

#define T_SYMBOL   RUBY_T_SYMBOL

Definition at line 79 of file value_type.h.

◆ T_TRUE

#define T_TRUE   RUBY_T_TRUE

Definition at line 80 of file value_type.h.

◆ T_UNDEF

#define T_UNDEF   RUBY_T_UNDEF

Definition at line 81 of file value_type.h.

◆ T_ZOMBIE

#define T_ZOMBIE   RUBY_T_ZOMBIE

Definition at line 82 of file value_type.h.

◆ TYPE

#define TYPE (   _)    RBIMPL_CAST((int)rb_type(_))

Definition at line 105 of file value_type.h.

Enumeration Type Documentation

◆ ruby_value_type

C-level type of an object.

Enumerator
RUBY_T_NONE 

Non-object (sweeped etc.)

RUBY_T_OBJECT 
See also
struct RObject
RUBY_T_CLASS 
See also
struct RClass and rb_cClass
RUBY_T_MODULE 
See also
struct RClass and rb_cModule
RUBY_T_FLOAT 
See also
struct RFloat
RUBY_T_STRING 
See also
struct RString
RUBY_T_REGEXP 
See also
struct RRegexp
RUBY_T_ARRAY 
See also
struct RArray
RUBY_T_HASH 
See also
struct RHash
RUBY_T_STRUCT 
See also
struct RStruct
RUBY_T_BIGNUM 
See also
struct RBignum
RUBY_T_FILE 
See also
struct RFile
RUBY_T_DATA 
See also
struct RTypedData
RUBY_T_MATCH 
See also
struct RMatch
RUBY_T_COMPLEX 
See also
struct RComplex
RUBY_T_RATIONAL 
See also
struct RRational
RUBY_T_NIL 
See also
RUBY_Qnil
RUBY_T_TRUE 
See also
RUBY_Qfalse
RUBY_T_FALSE 
See also
RUBY_Qtrue
RUBY_T_SYMBOL 
See also
struct RSymbol
RUBY_T_FIXNUM 

Integers formerly known as Fixnums.

RUBY_T_UNDEF 
See also
RUBY_Qundef
RUBY_T_IMEMO 
See also
struct RIMemo
RUBY_T_NODE 
See also
struct RNode
RUBY_T_ICLASS 

Hidden classes known as IClasses.

RUBY_T_ZOMBIE 
See also
struct RZombie
RUBY_T_MOVED 
See also
struct RMoved
RUBY_T_MASK 

Definition at line 108 of file value_type.h.