* 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
This commit is contained in:
nobu 2008-06-28 11:50:38 +00:00
parent 1318dff1a8
commit 54b64e2096
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Sat Jun 28 20:50:35 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,
rb_usascii_str_new2): use inline versions for gcc 4 or lator.
Sat Jun 28 13:12:06 2008 Tanaka Akira <akr@fsij.org>
* test/rubygems/test_gem.rb (test_self_path_APPLE_GEM_HOME): don't use

View File

@ -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));})