mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (str_buf_cat2): optimize since all second arguments are
constant literals. * string.c (str_cat_char): unused now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fd58dba97f
commit
37c552e550
2 changed files with 9 additions and 6 deletions
|
@ -1,4 +1,9 @@
|
|||
Sun Sep 27 11:58:35 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sun Sep 27 12:01:42 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (str_buf_cat2): optimize since all second arguments are
|
||||
constant literals.
|
||||
|
||||
* string.c (str_cat_char): unused now.
|
||||
|
||||
* string.c (rb_hash_{uint{32,},end}): removed.
|
||||
|
||||
|
|
8
string.c
8
string.c
|
@ -1741,11 +1741,7 @@ str_buf_cat(VALUE str, const char *ptr, long len)
|
|||
return str;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
str_buf_cat2(VALUE str, const char *ptr)
|
||||
{
|
||||
return str_buf_cat(str, ptr, strlen(ptr));
|
||||
}
|
||||
#define str_buf_cat2(str, ptr) str_buf_cat(str, (ptr), strlen(ptr))
|
||||
|
||||
VALUE
|
||||
rb_str_buf_cat(VALUE str, const char *ptr, long len)
|
||||
|
@ -4022,6 +4018,7 @@ rb_str_to_s(VALUE str)
|
|||
return str;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
str_cat_char(VALUE str, unsigned int c, rb_encoding *enc)
|
||||
{
|
||||
|
@ -4031,6 +4028,7 @@ str_cat_char(VALUE str, unsigned int c, rb_encoding *enc)
|
|||
rb_enc_mbcput(c, s, enc);
|
||||
rb_enc_str_buf_cat(str, s, n, enc);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
|
|
Loading…
Add table
Reference in a new issue