diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 08:32:23 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 08:32:23 +0000 |
commit | 9d0a5d8e96644394bbd0c344fb5d26098b7919c4 (patch) | |
tree | 9c3c746cfd4ad362a47ce79bb8ede1fcd2da8032 | |
parent | c59277cf39c0e4a6c9b5689e5ebaa464991dcdf8 (diff) | |
download | ruby-9d0a5d8e96644394bbd0c344fb5d26098b7919c4.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 3 | ||||
-rw-r--r-- | include/ruby/ruby.h | 66 |
3 files changed, 38 insertions, 37 deletions
@@ -1,3 +1,9 @@ +Sat Apr 26 17:30:11 2008 Koichi Sasada <ko1@atdot.net> + + * include/ruby/ruby.h, gc.c: remove T_BLOCK. + + * include/ruby/ruby.h: re-number T_xxx. + Sat Apr 26 17:31:09 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * process.c (rb_cProcessTms, rb_cProcessStatus): renamed. @@ -1185,7 +1185,6 @@ gc_mark_children(VALUE ptr, int lev) case T_REGEXP: case T_FLOAT: case T_BIGNUM: - case T_BLOCK: break; case T_MATCH: @@ -1469,7 +1468,6 @@ obj_free(VALUE obj) break; case T_FLOAT: - case T_BLOCK: break; case T_VALUES: break; @@ -2254,7 +2252,6 @@ count_objects(int argc, VALUE *argv, VALUE os) case T_MATCH: type = ID2SYM(rb_intern("T_MATCH")); break; case T_SYMBOL: type = ID2SYM(rb_intern("T_SYMBOL")); break; case T_VALUES: type = ID2SYM(rb_intern("T_VALUES")); break; - case T_BLOCK: type = ID2SYM(rb_intern("T_BLOCK")); break; case T_UNDEF: type = ID2SYM(rb_intern("T_UNDEF")); break; case T_NODE: type = ID2SYM(rb_intern("T_NODE")); break; default: type = INT2NUM(i); break; 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) |