summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-26 16:14:49 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-26 16:14:49 +0000
commit1366802a1f24065c9d02f47f59d9a0519f9cd516 (patch)
tree9099cd609e4ea57486cad643052e96579b0112b8
parentdb6ec3105ea5c3b7e30e15ec0a0b4d1a5dbe0ac3 (diff)
* transcode.c (transcode_loop): simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--transcode.c13
2 files changed, 6 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index ff399a4052..8f66bc8534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Aug 27 01:13:54 2008 Tanaka Akira <akr@fsij.org>
+
+ * transcode.c (transcode_loop): simplified.
+
Wed Aug 27 01:03:23 2008 Tanaka Akira <akr@fsij.org>
* include/ruby/encoding.h (rb_econv_result_t): enumeration constant:
diff --git a/transcode.c b/transcode.c
index 38548bc856..13d7c92452 100644
--- a/transcode.c
+++ b/transcode.c
@@ -1763,12 +1763,8 @@ transcode_loop(const unsigned char **in_pos, unsigned char **out_pos,
ret = rb_econv_convert(ec, in_pos, in_stop, out_pos, out_stop, 0);
if (ret == econv_invalid_byte_sequence ||
- ret == econv_incomplete_input) {
- exc = make_econv_exception(ec);
- rb_econv_close(ec);
- rb_exc_raise(exc);
- }
- if (ret == econv_undefined_conversion) {
+ ret == econv_incomplete_input ||
+ ret == econv_undefined_conversion) {
exc = make_econv_exception(ec);
rb_econv_close(ec);
rb_exc_raise(exc);
@@ -1831,11 +1827,6 @@ transcode_loop(const unsigned char **in_pos, unsigned char **out_pos,
switch (ret) {
case econv_invalid_byte_sequence:
case econv_incomplete_input:
- exc = make_econv_exception(ec);
- rb_econv_close(ec);
- rb_exc_raise(exc);
- break;
-
case econv_undefined_conversion:
exc = make_econv_exception(ec);
rb_econv_close(ec);