ruby-changes:43010
From: ngoto <ko1@a...>
Date: Fri, 20 May 2016 22:33:15 +0900 (JST)
Subject: [ruby-changes:43010] ngoto:r55084 (trunk): Use HAVE_BUILTIN___BUILTIN_CONSTANT_P
ngoto 2016-05-20 22:33:10 +0900 (Fri, 20 May 2016) New Revision: 55084 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55084 Log: Use HAVE_BUILTIN___BUILTIN_CONSTANT_P * symbol.h (rb_id2sym): Use HAVE_BUILTIN___BUILTIN_CONSTANT_P Modified files: trunk/ChangeLog trunk/symbol.h Index: ChangeLog =================================================================== --- ChangeLog (revision 55083) +++ ChangeLog (revision 55084) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri May 20 22:30:09 2016 Naohisa Goto <ngotogenome@g...> + + * symbol.h (rb_id2sym): Use HAVE_BUILTIN___BUILTIN_CONSTANT_P + Fri May 20 22:19:00 2016 Kazuhiro NISHIYAMA <zn@m...> * ext/date/date_core.c: [DOC] fix typos. Index: symbol.h =================================================================== --- symbol.h (revision 55083) +++ symbol.h (revision 55084) @@ -17,10 +17,10 @@ https://github.com/ruby/ruby/blob/trunk/symbol.h#L17 #define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID) #define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG) -#ifdef __GNUC__ +#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P #define rb_id2sym(id) \ - __extension__(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \ - STATIC_ID2SYM(id) : rb_id2sym(id)) + RB_GNUC_EXTENSION_BLOCK(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \ + STATIC_ID2SYM(id) : rb_id2sym(id)) #endif struct RSymbol { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/