Use HAVE_BUILTIN___BUILTIN_CONSTANT_P
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
91e3c8b370
commit
ac11f944e1
@ -1,3 +1,9 @@
|
||||
Fri May 13 03:11:20 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* configure.in (__builtin_constant_p): check.
|
||||
|
||||
* interna.h: Use HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
||||
|
||||
Fri May 13 03:10:39 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* configurein: use alternative keyword
|
||||
|
@ -2445,6 +2445,7 @@ RUBY_CHECK_BUILTIN_FUNC(__builtin_clzl, [__builtin_clzl(0)])
|
||||
RUBY_CHECK_BUILTIN_FUNC(__builtin_clzll, [__builtin_clzll(0)])
|
||||
RUBY_CHECK_BUILTIN_FUNC(__builtin_ctz, [__builtin_ctz(0)])
|
||||
RUBY_CHECK_BUILTIN_FUNC(__builtin_ctzll, [__builtin_ctzll(0)])
|
||||
RUBY_CHECK_BUILTIN_FUNC(__builtin_constant_p, [__builtin_constant_p(0)])
|
||||
RUBY_CHECK_BUILTIN_FUNC(__builtin_choose_expr, [
|
||||
[int x[__extension__(__builtin_choose_expr(1, 1, -1))]];
|
||||
[int y[__extension__(__builtin_choose_expr(0, -1, 1))]];
|
||||
|
@ -3,7 +3,7 @@
|
||||
* included by eval.c
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && !defined(__PCC__)
|
||||
#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
||||
#define warn_print(x) __extension__ ( \
|
||||
{ \
|
||||
(__builtin_constant_p(x)) ? \
|
||||
|
@ -145,7 +145,7 @@ VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
|
||||
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
|
||||
VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
|
||||
|
||||
#if defined(__GNUC__) && !defined(__PCC__)
|
||||
#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
||||
#define rb_enc_str_new(str, len, enc) __extension__ ( \
|
||||
{ \
|
||||
(__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
|
||||
|
@ -790,7 +790,7 @@ VALUE rb_str_scrub(VALUE, VALUE);
|
||||
/* symbol.c */
|
||||
VALUE rb_sym_all_symbols(void);
|
||||
|
||||
#if defined(__GNUC__) && !defined(__PCC__)
|
||||
#ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
||||
#define rb_str_new(str, len) __extension__ ( \
|
||||
{ \
|
||||
(__builtin_constant_p(str) && __builtin_constant_p(len)) ? \
|
||||
|
10
internal.h
10
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user