[前][次][番号順一覧][スレッド一覧]

ruby-changes:19207

From: akr <ko1@a...>
Date: Thu, 7 Apr 2011 20:04:25 +0900 (JST)
Subject: [ruby-changes:19207] Ruby:r31246 (trunk): * include/ruby/io.h: parenthesize macro arguments.

akr	2011-04-07 20:04:18 +0900 (Thu, 07 Apr 2011)

  New Revision: 31246

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31246

  Log:
    * include/ruby/io.h: parenthesize macro arguments.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/io.h

Index: include/ruby/io.h
===================================================================
--- include/ruby/io.h	(revision 31245)
+++ include/ruby/io.h	(revision 31246)
@@ -110,35 +110,35 @@
 	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);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31245)
+++ ChangeLog	(revision 31246)
@@ -1,3 +1,7 @@
+Thu Apr  7 20:03:52 2011  Tanaka Akira  <akr@f...>
+
+	* include/ruby/io.h: parenthesize macro arguments.
+
 Wed Apr  6 21:08:31 2011  Tanaka Akira  <akr@f...>
 
 	* include/ruby/intern.h: parenthesize macro arguments.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]