diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-24 07:12:44 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-24 07:12:44 +0000 |
commit | 1de50f32003d9f251fca5744e19c26af65b39fb7 (patch) | |
tree | edfb35283b18e6013f36bc68e52c70fd65b28212 /include | |
parent | c9784660bea081c21bd2f96a6c5c17ddc91175a4 (diff) | |
download | ruby-1de50f32003d9f251fca5744e19c26af65b39fb7.tar.gz ruby-1de50f32003d9f251fca5744e19c26af65b39fb7.tar.xz ruby-1de50f32003d9f251fca5744e19c26af65b39fb7.zip |
* 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
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/encoding.h | 8 |
1 files changed, 6 insertions, 2 deletions
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, |