diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-06 09:25:09 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-06 09:25:09 +0000 |
commit | 8987b97ca9d3eca076a489fbf6eb9c1dfbf72df2 (patch) | |
tree | 9bc30b9b9b1e796388684dbeef0dd2076c1052f3 /include/ruby | |
parent | 4ca078239309907130b6cb187d8d44ebaf220bae (diff) | |
download | ruby-8987b97ca9d3eca076a489fbf6eb9c1dfbf72df2.tar.gz |
* include/ruby/encoding.h (rb_enc_str_buf_cat): declared.
* string.c (coderange_scan): extracted from rb_enc_str_coderange.
(rb_enc_str_coderange): use coderange_scan.
(rb_str_shared_replace): copy encoding and coderange.
(rb_enc_str_buf_cat): new function for linear complexity string
accumulation with encoding.
(rb_str_sub_bang): don't conflict substituted part and replacement.
(str_gsub): use rb_enc_str_buf_cat.
(rb_str_clear): clear coderange.
* re.c (rb_reg_regsub): use rb_enc_str_buf_cat.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/encoding.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 2c247c99e9..bb29e7c46f 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -65,6 +65,7 @@ VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list); long rb_enc_strlen(const char*, const char*, rb_encoding*); char* rb_enc_nth(const char*, const char*, int, rb_encoding*); VALUE rb_obj_encoding(VALUE); +VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc); /* index -> rb_encoding */ rb_encoding* rb_enc_from_index(int idx); |