mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/io.h: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d55cf83561
commit
e6ef26ae4b
2 changed files with 29 additions and 25 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Apr 7 20:03:52 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/io.h: parenthesize macro arguments.
|
||||
|
||||
Wed Apr 6 21:08:31 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/intern.h: parenthesize macro arguments.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue