From e6ef26ae4b727d5e92af27bd251208b0bed4611a Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 7 Apr 2011 11:04:18 +0000 Subject: [PATCH] * include/ruby/io.h: parenthesize macro arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ include/ruby/io.h | 50 +++++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9a72457c5..c5ea22d1f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Apr 7 20:03:52 2011 Tanaka Akira + + * include/ruby/io.h: parenthesize macro arguments. + Wed Apr 6 21:08:31 2011 Tanaka Akira * include/ruby/intern.h: parenthesize macro arguments. 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);