diff options
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/io.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/include/ruby/io.h b/include/ruby/io.h index 1ca7f18afe..13f42591bd 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -110,35 +110,35 @@ typedef struct rb_io_t { rb_io_fptr_finalize(RFILE(obj)->fptr);\ RFILE(obj)->fptr = 0;\ }\ - fp = 0;\ + (fp) = 0;\ RB_IO_FPTR_NEW(fp);\ - RFILE(obj)->fptr = fp;\ + RFILE(obj)->fptr = (fp);\ } while (0) #define RB_IO_FPTR_NEW(fp) do {\ - fp = ALLOC(rb_io_t);\ - fp->fd = -1;\ - fp->stdio_file = NULL;\ - fp->mode = 0;\ - fp->pid = 0;\ - fp->lineno = 0;\ - fp->pathv = Qnil;\ - fp->finalize = 0;\ - RB_IO_BUFFER_INIT(fp->wbuf);\ - RB_IO_BUFFER_INIT(fp->rbuf);\ - RB_IO_BUFFER_INIT(fp->cbuf);\ - fp->readconv = NULL;\ - fp->writeconv = NULL;\ - fp->writeconv_asciicompat = Qnil;\ - fp->writeconv_pre_ecflags = 0;\ - fp->writeconv_pre_ecopts = Qnil;\ - fp->writeconv_initialized = 0;\ - fp->tied_io_for_writing = 0;\ - fp->encs.enc = NULL;\ - fp->encs.enc2 = NULL;\ - fp->encs.ecflags = 0;\ - fp->encs.ecopts = Qnil;\ - fp->write_lock = 0;\ + (fp) = ALLOC(rb_io_t);\ + (fp)->fd = -1;\ + (fp)->stdio_file = NULL;\ + (fp)->mode = 0;\ + (fp)->pid = 0;\ + (fp)->lineno = 0;\ + (fp)->pathv = Qnil;\ + (fp)->finalize = 0;\ + RB_IO_BUFFER_INIT((fp)->wbuf);\ + RB_IO_BUFFER_INIT((fp)->rbuf);\ + RB_IO_BUFFER_INIT((fp)->cbuf);\ + (fp)->readconv = NULL;\ + (fp)->writeconv = NULL;\ + (fp)->writeconv_asciicompat = Qnil;\ + (fp)->writeconv_pre_ecflags = 0;\ + (fp)->writeconv_pre_ecopts = Qnil;\ + (fp)->writeconv_initialized = 0;\ + (fp)->tied_io_for_writing = 0;\ + (fp)->encs.enc = NULL;\ + (fp)->encs.enc2 = NULL;\ + (fp)->encs.ecflags = 0;\ + (fp)->encs.ecopts = Qnil;\ + (fp)->write_lock = 0;\ } while (0) FILE *rb_io_stdio_file(rb_io_t *fptr); |