aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-16 15:04:39 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-16 15:04:39 +0000
commit6acb0e79c810175194d644b2e37bb2bef0e9e972 (patch)
tree96a2b701d1ded13fb88432bc83c5adc74d976ea0 /include/ruby
parenta4df037ffd5041b2e10857184b1340b7bcbf42ad (diff)
downloadruby-6acb0e79c810175194d644b2e37bb2bef0e9e972.tar.gz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@18662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/encoding.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index 16cfef2539..18d32d87c6 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 */