Use HAVE_BUILTIN___BUILTIN_CONSTANT_P

* symbol.h (rb_id2sym): Use HAVE_BUILTIN___BUILTIN_CONSTANT_P


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ngoto 2016-05-20 13:33:10 +00:00
Родитель ffb34cce89
Коммит 8a77596858
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Fri May 20 22:30:09 2016 Naohisa Goto <ngotogenome@gmail.com>
* symbol.h (rb_id2sym): Use HAVE_BUILTIN___BUILTIN_CONSTANT_P
Fri May 20 22:19:00 2016 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* ext/date/date_core.c: [DOC] fix typos.

Просмотреть файл

@ -17,10 +17,10 @@
#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 {