summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-12 18:12:46 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-12 18:12:46 (GMT)
commitac11f944e143eaaaf596e3efb94a522502788af7 (patch)
treeebedbdf03d2c5fbc703f8b5dcc130b429a83b3a8 /internal.h
parent91e3c8b3702dfc1cff4f6c6fae6ab9cf55625644 (diff)
Use HAVE_BUILTIN___BUILTIN_CONSTANT_P
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal.h b/internal.h
index d4565ee..001a385 100644
--- a/internal.h
+++ b/internal.h
@@ -1323,8 +1323,8 @@ VALUE rb_fstring_new(const char *ptr, long len);
#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
#define rb_fstring_literal(str) rb_fstring_lit(str)
VALUE rb_fstring_cstr(const char *str);
-#if defined(__GNUC__) && !defined(__PCC__)
-#define rb_fstring_cstr(str) __extension__ ( \
+#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
+# define rb_fstring_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
rb_fstring_new((str), (long)strlen(str)) : \
@@ -1336,14 +1336,14 @@ VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
#define rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
#define rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc)
VALUE rb_fstring_enc_cstr(const char *ptr, rb_encoding *enc);
-#if defined(__GNUC__) && !defined(__PCC__)
-#define rb_fstring_enc_cstr(str, enc) __extension__ ( \
+# ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
+# define rb_fstring_enc_cstr(str, enc) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
rb_fstring_enc_new((str), (long)strlen(str), (enc)) : \
rb_fstring_enc_cstr(str, enc); \
})
-#endif
+# endif
#endif
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
int rb_str_symname_p(VALUE);