summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--include/ruby/encoding.h4
-rw-r--r--io.c4
-rw-r--r--transcode.c6
4 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 5011693a6..b4312ecc8 100644
--- a/ChangeLog
+++ b/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>
* test/bigdecimal/test_bigdecimal.rb (test_inspect): fixed CPU bit
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index b6ac57418..1d1293435 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 4db538b12..774f3e7e1 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 9734420ac..43013be0f 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) {