From 1de50f32003d9f251fca5744e19c26af65b39fb7 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 24 Aug 2008 07:12:44 +0000 Subject: * include/ruby/encoding.h (rb_econv_option_t): defined. (rb_econv_open): 3rd arg changed. (rb_econv_open_exc): ditto. * io.c (make_writeconv): use rb_econv_option_t. (make_readconv): ditto. (rb_econv_open): take rb_econv_option_t for options. (rb_econv_open_exc): ditto. (transcode_loop): use rb_econv_option_t. (econv_init): use rb_econv_option_t. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 3701b2d12..b952c7402 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -249,14 +249,18 @@ typedef struct { rb_encoding *destination_encoding; } rb_econv_t; -rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int flags); +typedef struct { + int flags; +} rb_econv_option_t; + +rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, rb_econv_option_t *opts); rb_econv_result_t rb_econv_convert(rb_econv_t *ec, const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end, unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end, int flags); void rb_econv_close(rb_econv_t *ec); -VALUE rb_econv_open_exc(const char *senc, const char *denc, int flags); +VALUE rb_econv_open_exc(const char *senc, const char *denc, rb_econv_option_t *opts); /* result: 0:success -1:failure */ int rb_econv_insert_output(rb_econv_t *ec, -- cgit