From d7bf4546664feb3f8b4b07817978e389e9f2b381 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 24 Aug 2008 07:49:13 +0000 Subject: * include/ruby/io.h (rb_io_t): make enc and enc2 as struct rb_io_enc_t; * io.c: follow the structure change. (convconfig_t): defined by rb_io_enc_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/io.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/io.h b/include/ruby/io.h index dbbba48ce5..217387e11a 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -55,8 +55,10 @@ typedef struct rb_io_t { * e1 NULL force_encoding(e1) convert str.encoding to e1 * e1 e2 convert from e2 to e1 convert str.encoding to e2 */ - rb_encoding *enc; - rb_encoding *enc2; + struct rb_io_enc_t { + rb_encoding *enc; + rb_encoding *enc2; + } encs; rb_econv_t *readconv; char *crbuf; /* crbuf_off + crbuf_len <= crbuf_capa */ @@ -129,8 +131,8 @@ typedef struct rb_io_t { fp->writeconv_stateless = Qnil;\ fp->writeconv_initialized = 0;\ fp->tied_io_for_writing = 0;\ - fp->enc = 0;\ - fp->enc2 = 0;\ + fp->encs.enc = NULL;\ + fp->encs.enc2 = NULL;\ } while (0) FILE *rb_io_stdio_file(rb_io_t *fptr); -- cgit v1.2.3