From 1366802a1f24065c9d02f47f59d9a0519f9cd516 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 26 Aug 2008 16:14:49 +0000 Subject: [PATCH] * transcode.c (transcode_loop): simplified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ transcode.c | 13 ++----------- 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 + + * transcode.c (transcode_loop): simplified. + Wed Aug 27 01:03:23 2008 Tanaka Akira * 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);