From 56343375b81d0a4370bfe59c54364060701fe3b5 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 3 Sep 2008 15:11:46 +0000 Subject: * include/ruby/encoding.h (rb_econv_option_t): removed. Since rb_econv_option_t has only one field, int flags, rb_econv_option_t is replaced by int. * include/ruby/io.h: follow the above change. * io.c: ditto. * transcode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'include/ruby/encoding.h') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 23b61463c3..bdbe94a4a9 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -206,25 +206,20 @@ typedef enum { econv_incomplete_input, } rb_econv_result_t; -typedef struct { - int flags; - /* replacement character, etc. */ -} rb_econv_option_t; - typedef struct rb_econv_t rb_econv_t; -VALUE rb_str_transcode(VALUE str, VALUE to, rb_econv_option_t *ecopts); +VALUE rb_str_transcode(VALUE str, VALUE to, int ecflags); -void rb_econv_opts(VALUE hash, rb_econv_option_t *opts); +int rb_econv_flags(VALUE hash); -rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, rb_econv_option_t *opts); +rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags); 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, rb_econv_option_t *opts); +VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags); /* result: 0:success -1:failure */ int rb_econv_insert_output(rb_econv_t *ec, -- cgit v1.2.3