diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-03 15:11:46 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-03 15:11:46 +0000 |
| commit | 6e19e7a8de5b6ec879850a3d9f4a82652e24f04e (patch) | |
| tree | 47319a1db970076e61b53d7c6427f43c0d16a215 /include/ruby | |
| parent | 15941722f7fdea252a070910cd49101fedf7a7cd (diff) | |
| download | ruby-6e19e7a8de5b6ec879850a3d9f4a82652e24f04e.tar.gz ruby-6e19e7a8de5b6ec879850a3d9f4a82652e24f04e.tar.xz ruby-6e19e7a8de5b6ec879850a3d9f4a82652e24f04e.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@19103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
| -rw-r--r-- | include/ruby/encoding.h | 13 | ||||
| -rw-r--r-- | include/ruby/io.h | 6 |
2 files changed, 7 insertions, 12 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 23b61463c..bdbe94a4a 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, diff --git a/include/ruby/io.h b/include/ruby/io.h index cb2df584d..cdef496a9 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -57,7 +57,7 @@ typedef struct rb_io_t { struct rb_io_enc_t { rb_encoding *enc; rb_encoding *enc2; - rb_econv_option_t opts; + int flags; } encs; rb_econv_t *readconv; @@ -68,7 +68,7 @@ typedef struct rb_io_t { rb_econv_t *writeconv; VALUE writeconv_stateless; - rb_econv_option_t writeconv_pre_opts; + int writeconv_pre_flags; int writeconv_initialized; } rb_io_t; @@ -127,7 +127,7 @@ typedef struct rb_io_t { fp->tied_io_for_writing = 0;\ fp->encs.enc = NULL;\ fp->encs.enc2 = NULL;\ - fp->encs.opts.flags = 0;\ + fp->encs.flags = 0;\ } while (0) FILE *rb_io_stdio_file(rb_io_t *fptr); |
