From 9d0a5d8e96644394bbd0c344fb5d26098b7919c4 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 26 Apr 2008 08:32:23 +0000 Subject: * include/ruby/ruby.h, gc.c: remove T_BLOCK. * include/ruby/ruby.h: re-number T_xxx. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 66 ++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index d3b8967f56..e6ea830e64 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -231,65 +231,63 @@ enum ruby_special_consts { enum ruby_value_type { RUBY_T_NONE = 0x00, -#define T_NONE RUBY_T_NONE - RUBY_T_NIL = 0x01, + 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_VALUES = 0x1a, + RUBY_T_UNDEF = 0x1b, + RUBY_T_NODE = 0x1c, + RUBY_T_ICLASS = 0x1d, + + RUBY_T_MASK = 0x1f, +}; + +#define T_NONE RUBY_T_NONE #define T_NIL RUBY_T_NIL - RUBY_T_OBJECT = 0x02, #define T_OBJECT RUBY_T_OBJECT - RUBY_T_CLASS = 0x03, #define T_CLASS RUBY_T_CLASS - RUBY_T_ICLASS = 0x04, #define T_ICLASS RUBY_T_ICLASS - RUBY_T_MODULE = 0x05, #define T_MODULE RUBY_T_MODULE - RUBY_T_FLOAT = 0x06, #define T_FLOAT RUBY_T_FLOAT - RUBY_T_STRING = 0x07, #define T_STRING RUBY_T_STRING - RUBY_T_REGEXP = 0x08, #define T_REGEXP RUBY_T_REGEXP - RUBY_T_ARRAY = 0x09, #define T_ARRAY RUBY_T_ARRAY - RUBY_T_FIXNUM = 0x0a, -#define T_FIXNUM RUBY_T_FIXNUM - RUBY_T_HASH = 0x0b, #define T_HASH RUBY_T_HASH - RUBY_T_STRUCT = 0x0c, #define T_STRUCT RUBY_T_STRUCT - RUBY_T_BIGNUM = 0x0d, #define T_BIGNUM RUBY_T_BIGNUM - RUBY_T_FILE = 0x0e, #define T_FILE RUBY_T_FILE - - RUBY_T_TRUE = 0x10, +#define T_FIXNUM RUBY_T_FIXNUM #define T_TRUE RUBY_T_TRUE - RUBY_T_FALSE = 0x11, #define T_FALSE RUBY_T_FALSE - RUBY_T_DATA = 0x12, #define T_DATA RUBY_T_DATA - RUBY_T_MATCH = 0x13, #define T_MATCH RUBY_T_MATCH - RUBY_T_SYMBOL = 0x14, #define T_SYMBOL RUBY_T_SYMBOL - - RUBY_T_RATIONAL = 0x15, #define T_RATIONAL RUBY_T_RATIONAL - RUBY_T_COMPLEX = 0x16, #define T_COMPLEX RUBY_T_COMPLEX - - RUBY_T_VALUES = 0x1a, #define T_VALUES RUBY_T_VALUES - RUBY_T_BLOCK = 0x1b, -#define T_BLOCK RUBY_T_BLOCK - RUBY_T_UNDEF = 0x1c, #define T_UNDEF RUBY_T_UNDEF - RUBY_T_NODE = 0x1f, #define T_NODE RUBY_T_NODE - - RUBY_T_MASK = 0x1f, #define T_MASK RUBY_T_MASK -}; #define BUILTIN_TYPE(x) (((struct RBasic*)(x))->flags & T_MASK) -- cgit v1.2.3