* 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
This commit is contained in:
parent
577e64a874
commit
a3bebd5564
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Fri Sep 26 19:33:36 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Fri Sep 26 19:01:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* test/bigdecimal/test_bigdecimal.rb (test_inspect): fixed CPU bit
|
* test/bigdecimal/test_bigdecimal.rb (test_inspect): fixed CPU bit
|
||||||
|
@ -208,8 +208,8 @@ typedef enum {
|
|||||||
|
|
||||||
typedef struct rb_econv_t rb_econv_t;
|
typedef struct rb_econv_t rb_econv_t;
|
||||||
|
|
||||||
VALUE rb_str_transcode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
|
VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
|
||||||
int rb_transcode_convertible(const char* from_encoding, const char* to_encoding);
|
int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding);
|
||||||
|
|
||||||
int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
|
int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
|
||||||
|
|
||||||
|
4
io.c
4
io.c
@ -834,7 +834,7 @@ do_writeconv(VALUE str, rb_io_t *fptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!NIL_P(common_encoding)) {
|
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);
|
fptr->writeconv_pre_ecflags, fptr->writeconv_pre_ecopts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4683,7 +4683,7 @@ rb_scan_open_args(int argc, VALUE *argv,
|
|||||||
static VALUE fs_enc;
|
static VALUE fs_enc;
|
||||||
if (!fs_enc)
|
if (!fs_enc)
|
||||||
fs_enc = rb_enc_from_encoding(fs_encoding);
|
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
|
#endif
|
||||||
|
@ -2596,7 +2596,7 @@ str_encode(int argc, VALUE *argv, VALUE str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
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;
|
int argc = 1;
|
||||||
VALUE *argv = &to;
|
VALUE *argv = &to;
|
||||||
@ -2845,7 +2845,7 @@ econv_s_search_convpath(int argc, VALUE *argv, VALUE klass)
|
|||||||
* result: >=0:success -1:failure
|
* result: >=0:success -1:failure
|
||||||
*/
|
*/
|
||||||
int
|
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;
|
VALUE convpath = Qnil;
|
||||||
transcode_search_path(from_encoding, to_encoding, search_convpath_i,
|
transcode_search_path(from_encoding, to_encoding, search_convpath_i,
|
||||||
@ -3676,7 +3676,7 @@ econv_insert_output(VALUE self, VALUE string)
|
|||||||
|
|
||||||
StringValue(string);
|
StringValue(string);
|
||||||
insert_enc = rb_econv_encoding_to_insert_output(ec);
|
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);
|
ret = rb_econv_insert_output(ec, (const unsigned char *)RSTRING_PTR(string), RSTRING_LEN(string), insert_enc);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user