summaryrefslogtreecommitdiff
path: root/symbol.h
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 13:33:10 (GMT)
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 13:33:10 (GMT)
commit8a775968586a1d3f1a3520ffe0b49989d59d3ae4 (patch)
treefc1708c336536faad7b55158bc82e81e1e6cc406 /symbol.h
parentffb34cce89c63d43e2ae6a5c3956489fd3c5c4c7 (diff)
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
Diffstat (limited to 'symbol.h')
-rw-r--r--symbol.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/symbol.h b/symbol.h
index 641b979..1f0b139 100644
--- a/symbol.h
+++ b/symbol.h
@@ -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 {