From 54b64e2096eacbfd5e868cf47c5fec6b9defbaa4 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 28 Jun 2008 11:50:38 +0000 Subject: * include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2, rb_usascii_str_new2): use inline versions for gcc 4 or lator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index fdd388792a..f109cf75ef 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -535,7 +535,7 @@ VALUE rb_str_buf_new2(const char*); VALUE rb_str_tmp_new(long); VALUE rb_usascii_str_new(const char*, long); VALUE rb_usascii_str_new2(const char*); -#if defined __GNUC__ && defined __OPTIMIZE__ && __OPTIMIZE__ +#if __GNUC__ >= 4 && defined __OPTIMIZE__ && __OPTIMIZE__ #define rb_str_new2(str) ({const char *_s = (str); rb_str_new(_s, strlen(_s));}) #define rb_tainted_str_new2(str) ({const char *_s = (str); rb_tainted_str_new(_s, strlen(_s));}) #define rb_usascii_str_new2(str) ({const char *_s = (str); rb_usascii_str_new(_s, strlen(_s));}) -- cgit v1.2.3