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

ruby-changes:18193

From: akr <ko1@a...>
Date: Wed, 15 Dec 2010 07:23:53 +0900 (JST)
Subject: [ruby-changes:18193] Ruby:r30214 (trunk): * hash.c: parenthesize macro arguments.

akr	2010-12-15 07:18:39 +0900 (Wed, 15 Dec 2010)

  New Revision: 30214

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

  Log:
    * hash.c: parenthesize macro arguments.

  Modified files:
    trunk/ChangeLog
    trunk/hash.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30213)
+++ ChangeLog	(revision 30214)
@@ -1,3 +1,7 @@
+Wed Dec 15 07:11:55 2010  Tanaka Akira  <akr@f...>
+
+	* hash.c: parenthesize macro arguments.
+
 Wed Dec 15 04:02:00 2010  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config):
Index: hash.c
===================================================================
--- hash.c	(revision 30213)
+++ hash.c	(revision 30214)
@@ -2003,7 +2003,7 @@
 
 static char **origenviron;
 #ifdef _WIN32
-#define GET_ENVIRON(e) (e = rb_w32_get_environ())
+#define GET_ENVIRON(e) ((e) = rb_w32_get_environ())
 #define FREE_ENVIRON(e) rb_w32_free_environ(e)
 static char **my_environ;
 #undef environ
@@ -2019,11 +2019,11 @@
 #define FREE_ENVIRON(e)
 #endif
 #ifdef ENV_IGNORECASE
-#define ENVMATCH(s1, s2) (STRCASECMP(s1, s2) == 0)
-#define ENVNMATCH(s1, s2, n) (STRNCASECMP(s1, s2, n) == 0)
+#define ENVMATCH(s1, s2) (STRCASECMP((s1), (s2)) == 0)
+#define ENVNMATCH(s1, s2, n) (STRNCASECMP((s1), (s2), (n)) == 0)
 #else
-#define ENVMATCH(n1, n2) (strcmp(n1, n2) == 0)
-#define ENVNMATCH(s1, s2, n) (memcmp(s1, s2, n) == 0)
+#define ENVMATCH(n1, n2) (strcmp((n1), (n2)) == 0)
+#define ENVNMATCH(s1, s2, n) (memcmp((s1), (s2), (n)) == 0)
 #endif
 
 static VALUE

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

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