mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode.c (transcode_loop): simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
db6ec3105e
commit
1366802a1f
2 changed files with 6 additions and 11 deletions
|
@ -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:
|
||||
|
|
13
transcode.c
13
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);
|
||||
|
|
Loading…
Reference in a new issue