ruby-changes:35468
From: nobu <ko1@a...>
Date: Fri, 12 Sep 2014 16:44:20 +0900 (JST)
Subject: [ruby-changes:35468] nobu:r47550 (trunk): ruby/ruby.h: move comments
nobu 2014-09-12 16:44:10 +0900 (Fri, 12 Sep 2014) New Revision: 47550 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47550 Log: ruby/ruby.h: move comments * include/ruby/ruby.h (enum ruby_special_consts): move bit pattern comments side-by-side. Modified files: trunk/include/ruby/ruby.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 47549) +++ include/ruby/ruby.h (revision 47550) @@ -376,54 +376,32 @@ VALUE rb_id2sym(ID); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L376 /* Module#methods, #singleton_methods and so on return Symbols */ #define USE_SYMBOL_AS_METHOD_NAME 1 -/* -!USE_FLONUM -------------------------- -...xxxx xxx1 Fixnum -...0000 1110 Symbol -...0000 0000 Qfalse -...0000 0010 Qtrue -...0000 0100 Qnil -...0000 0110 Qundef - -USE_FLONUM -------------------------- -...xxxx xxx1 Fixnum -...xxxx xx10 Flonum -...0000 1100 Symbol -...0000 0000 Qfalse 0x00 = 0 -...0000 1000 Qnil 0x08 = 8 -...0001 0100 Qtrue 0x14 = 20 -...0011 0100 Qundef 0x34 = 52 - */ - /* special constants - i.e. non-zero and non-fixnum constants */ enum ruby_special_consts { #if USE_FLONUM - RUBY_Qfalse = 0x00, - RUBY_Qtrue = 0x14, - RUBY_Qnil = 0x08, - RUBY_Qundef = 0x34, + RUBY_Qfalse = 0x00, /* ...0000 0000 */ + RUBY_Qtrue = 0x14, /* ...0001 0100 */ + RUBY_Qnil = 0x08, /* ...0000 1000 */ + RUBY_Qundef = 0x34, /* ...0011 0100 */ RUBY_IMMEDIATE_MASK = 0x07, - RUBY_FIXNUM_FLAG = 0x01, + RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */ RUBY_FLONUM_MASK = 0x03, - RUBY_FLONUM_FLAG = 0x02, - RUBY_SYMBOL_FLAG = 0x0c, - RUBY_SPECIAL_SHIFT = 8 + RUBY_FLONUM_FLAG = 0x02, /* ...xxxx xx10 */ + RUBY_SYMBOL_FLAG = 0x0c, /* ...0000 1100 */ #else - RUBY_Qfalse = 0, - RUBY_Qtrue = 2, - RUBY_Qnil = 4, - RUBY_Qundef = 6, + RUBY_Qfalse = 0, /* ...0000 0000 */ + RUBY_Qtrue = 2, /* ...0000 0010 */ + RUBY_Qnil = 4, /* ...0000 0100 */ + RUBY_Qundef = 6, /* ...0000 0110 */ RUBY_IMMEDIATE_MASK = 0x03, - RUBY_FIXNUM_FLAG = 0x01, + RUBY_FIXNUM_FLAG = 0x01, /* ...xxxx xxx1 */ RUBY_FLONUM_MASK = 0x00, /* any values ANDed with FLONUM_MASK cannot be FLONUM_FLAG */ RUBY_FLONUM_FLAG = 0x02, - RUBY_SYMBOL_FLAG = 0x0e, - RUBY_SPECIAL_SHIFT = 8 + RUBY_SYMBOL_FLAG = 0x0e, /* ...0000 1110 */ #endif + RUBY_SPECIAL_SHIFT = 8 }; #define Qfalse ((VALUE)RUBY_Qfalse) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/