From a3bebd55645e0feac9c03d727e807080e6cd6b4a Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 26 Sep 2008 10:35:00 +0000 Subject: [PATCH] * include/ruby/encoding.h (rb_str_encode): renamed from rb_str_transcode. [ruby-dev:36593] (rb_econv_has_convpath_p): renamed from rb_transcode_convertible. * transcode.c: follow the renaming. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ include/ruby/encoding.h | 4 ++-- io.c | 4 ++-- transcode.c | 6 +++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5011693a6a..b4312ecc84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Sep 26 19:33:36 2008 Tanaka Akira + + * include/ruby/encoding.h (rb_str_encode): renamed from + rb_str_transcode. [ruby-dev:36593] + (rb_econv_has_convpath_p): renamed from rb_transcode_convertible. + + * transcode.c: follow the renaming. + + * io.c: ditto. + Fri Sep 26 19:01:47 2008 Nobuyoshi Nakada * test/bigdecimal/test_bigdecimal.rb (test_inspect): fixed CPU bit diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index b6ac57418c..1d12934356 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -208,8 +208,8 @@ typedef enum { typedef struct rb_econv_t rb_econv_t; -VALUE rb_str_transcode(VALUE str, VALUE to, int ecflags, VALUE ecopts); -int rb_transcode_convertible(const char* from_encoding, const char* to_encoding); +VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts); +int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding); int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts); diff --git a/io.c b/io.c index 4db538b121..774f3e7e18 100644 --- a/io.c +++ b/io.c @@ -834,7 +834,7 @@ do_writeconv(VALUE str, rb_io_t *fptr) } if (!NIL_P(common_encoding)) { - str = rb_str_transcode(str, common_encoding, + str = rb_str_encode(str, common_encoding, fptr->writeconv_pre_ecflags, fptr->writeconv_pre_ecopts); } @@ -4683,7 +4683,7 @@ rb_scan_open_args(int argc, VALUE *argv, static VALUE fs_enc; if (!fs_enc) fs_enc = rb_enc_from_encoding(fs_encoding); - fname = rb_str_transcode(fname, fs_enc, 0, Qnil); + fname = rb_str_encode(fname, fs_enc, 0, Qnil); } } #endif diff --git a/transcode.c b/transcode.c index 9734420acd..43013be0ff 100644 --- a/transcode.c +++ b/transcode.c @@ -2596,7 +2596,7 @@ str_encode(int argc, VALUE *argv, VALUE str) } VALUE -rb_str_transcode(VALUE str, VALUE to, int ecflags, VALUE ecopts) +rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts) { int argc = 1; VALUE *argv = &to; @@ -2845,7 +2845,7 @@ econv_s_search_convpath(int argc, VALUE *argv, VALUE klass) * result: >=0:success -1:failure */ int -rb_transcode_convertible(const char* from_encoding, const char* to_encoding) +rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding) { VALUE convpath = Qnil; transcode_search_path(from_encoding, to_encoding, search_convpath_i, @@ -3676,7 +3676,7 @@ econv_insert_output(VALUE self, VALUE string) StringValue(string); insert_enc = rb_econv_encoding_to_insert_output(ec); - string = rb_str_transcode(string, rb_enc_from_encoding(rb_enc_find(insert_enc)), 0, Qnil); + string = rb_str_encode(string, rb_enc_from_encoding(rb_enc_find(insert_enc)), 0, Qnil); ret = rb_econv_insert_output(ec, (const unsigned char *)RSTRING_PTR(string), RSTRING_LEN(string), insert_enc); if (ret == -1) {