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

ruby-changes:19064

From: akr <ko1@a...>
Date: Sun, 13 Mar 2011 18:11:57 +0900 (JST)
Subject: [ruby-changes:19064] Ruby:r31103 (trunk): * ext/openssl/ossl_x509attr.c: parenthesize macro arguments.

akr	2011-03-13 18:11:45 +0900 (Sun, 13 Mar 2011)

  New Revision: 31103

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

  Log:
    * ext/openssl/ossl_x509attr.c: parenthesize macro arguments.

  Modified files:
    trunk/ChangeLog
    trunk/ext/openssl/ossl_x509attr.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31102)
+++ ChangeLog	(revision 31103)
@@ -1,3 +1,7 @@
+Sun Mar 13 18:11:28 2011  Tanaka Akira  <akr@f...>
+
+	* ext/openssl/ossl_x509attr.c: parenthesize macro arguments.
+
 Sun Mar 13 16:07:58 2011  Shota Fukumori  <sorah@t...>
 
 	* lib/pstore.rb: Fix don't raise "nested transaction" when thread_safe
Index: ext/openssl/ossl_x509attr.c
===================================================================
--- ext/openssl/ossl_x509attr.c	(revision 31102)
+++ ext/openssl/ossl_x509attr.c	(revision 31103)
@@ -11,20 +11,20 @@
 #include "ossl.h"
 
 #define WrapX509Attr(klass, obj, attr) do { \
-    if (!attr) { \
+    if (!(attr)) { \
 	ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
     } \
-    obj = Data_Wrap_Struct(klass, 0, X509_ATTRIBUTE_free, attr); \
+    (obj) = Data_Wrap_Struct((klass), 0, X509_ATTRIBUTE_free, (attr)); \
 } while (0)
 #define GetX509Attr(obj, attr) do { \
-    Data_Get_Struct(obj, X509_ATTRIBUTE, attr); \
-    if (!attr) { \
+    Data_Get_Struct((obj), X509_ATTRIBUTE, (attr)); \
+    if (!(attr)) { \
 	ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
     } \
 } while (0)
 #define SafeGetX509Attr(obj, attr) do { \
-    OSSL_Check_Kind(obj, cX509Attr); \
-    GetX509Attr(obj, attr); \
+    OSSL_Check_Kind((obj), cX509Attr); \
+    GetX509Attr((obj), (attr)); \
 } while (0)
 
 /*

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

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