diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-16 15:04:39 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-16 15:04:39 +0000 |
commit | c559ea53cb3d1bebf34b906b217c65250f59c82a (patch) | |
tree | 96a2b701d1ded13fb88432bc83c5adc74d976ea0 /include/ruby/encoding.h | |
parent | ed5aaab5fa542bc9998890da657a904fe0d9a1c4 (diff) | |
download | ruby-c559ea53cb3d1bebf34b906b217c65250f59c82a.tar.gz ruby-c559ea53cb3d1bebf34b906b217c65250f59c82a.tar.xz ruby-c559ea53cb3d1bebf34b906b217c65250f59c82a.zip |
* include/ruby/encoding.h (rb_econv_check_error): declared.
* transcode.c (make_econv_exception): new function.
(transcode_loop): use make_econv_exception.
(rb_econv_check_error): defined.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/encoding.h')
-rw-r--r-- | include/ruby/encoding.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 16cfef253..18d32d87c 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -254,7 +254,6 @@ rb_econv_result_t rb_econv_convert(rb_econv_t *ec, unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end, int flags); - /* result: 0:success -1:failure */ int rb_econv_insert_output(rb_econv_t *ec, const unsigned char *str, size_t len, const char *str_encoding); @@ -262,6 +261,9 @@ int rb_econv_insert_output(rb_econv_t *ec, /* encoding that rb_econv_insert_output doesn't need conversion */ const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec); +/* raise an error if the last rb_econv_convert is error */ +void rb_econv_check_error(rb_econv_t *ec); + void rb_econv_close(rb_econv_t *ec); /* flags for rb_econv_open */ |