ruby-changes:8063
From: akr <ko1@a...>
Date: Fri, 26 Sep 2008 19:39:23 +0900 (JST)
Subject: [ruby-changes:8063] Ruby:r19589 (trunk): * include/ruby/encoding.h (rb_str_encode): renamed from
akr 2008-09-26 19:35:00 +0900 (Fri, 26 Sep 2008) New Revision: 19589 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19589 Log: * 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. Modified files: trunk/ChangeLog trunk/include/ruby/encoding.h trunk/io.c trunk/transcode.c Index: include/ruby/encoding.h =================================================================== --- include/ruby/encoding.h (revision 19588) +++ include/ruby/encoding.h (revision 19589) @@ -208,8 +208,8 @@ 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); Index: ChangeLog =================================================================== --- ChangeLog (revision 19588) +++ ChangeLog (revision 19589) @@ -1,3 +1,13 @@ +Fri Sep 26 19:33:36 2008 Tanaka Akira <akr@f...> + + * 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 <nobu@r...> * test/bigdecimal/test_bigdecimal.rb (test_inspect): fixed CPU bit Index: io.c =================================================================== --- io.c (revision 19588) +++ io.c (revision 19589) @@ -834,7 +834,7 @@ } 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 @@ 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 Index: transcode.c =================================================================== --- transcode.c (revision 19588) +++ transcode.c (revision 19589) @@ -2596,7 +2596,7 @@ } 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 @@ * 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 @@ 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) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/