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

ruby-changes:19095

From: akr <ko1@a...>
Date: Sun, 20 Mar 2011 12:43:50 +0900 (JST)
Subject: [ruby-changes:19095] Ruby:r31134 (trunk): * ext/openssl/ossl_x509store.c: parenthesize macro arguments.

akr	2011-03-20 12:43:40 +0900 (Sun, 20 Mar 2011)

  New Revision: 31134

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

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

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31133)
+++ ChangeLog	(revision 31134)
@@ -1,3 +1,7 @@
+Sun Mar 20 12:43:12 2011  Tanaka Akira  <akr@f...>
+
+	* ext/openssl/ossl_x509store.c: parenthesize macro arguments.
+
 Sun Mar 20 01:39:48 2011  Tajima Akio <artonx@y...>
 
 	* hash.c (ruby_setenv): check env process block size with OS ver.
Index: ext/openssl/ossl_x509store.c
===================================================================
--- ext/openssl/ossl_x509store.c	(revision 31133)
+++ ext/openssl/ossl_x509store.c	(revision 31134)
@@ -11,37 +11,37 @@
 #include "ossl.h"
 
 #define WrapX509Store(klass, obj, st) do { \
-    if (!st) { \
+    if (!(st)) { \
 	ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
     } \
-    obj = Data_Wrap_Struct(klass, 0, X509_STORE_free, st); \
+    (obj) = Data_Wrap_Struct((klass), 0, X509_STORE_free, (st)); \
 } while (0)
 #define GetX509Store(obj, st) do { \
-    Data_Get_Struct(obj, X509_STORE, st); \
-    if (!st) { \
+    Data_Get_Struct((obj), X509_STORE, (st)); \
+    if (!(st)) { \
 	ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
     } \
 } while (0)
 #define SafeGetX509Store(obj, st) do { \
-    OSSL_Check_Kind(obj, cX509Store); \
-    GetX509Store(obj, st); \
+    OSSL_Check_Kind((obj), cX509Store); \
+    GetX509Store((obj), (st)); \
 } while (0)
 
 #define WrapX509StCtx(klass, obj, ctx) do { \
-    if (!ctx) { \
+    if (!(ctx)) { \
 	ossl_raise(rb_eRuntimeError, "STORE_CTX wasn't initialized!"); \
     } \
-    obj = Data_Wrap_Struct(klass, 0, ossl_x509stctx_free, ctx); \
+    (obj) = Data_Wrap_Struct((klass), 0, ossl_x509stctx_free, (ctx)); \
 } while (0)
 #define GetX509StCtx(obj, ctx) do { \
-    Data_Get_Struct(obj, X509_STORE_CTX, ctx); \
-    if (!ctx) { \
+    Data_Get_Struct((obj), X509_STORE_CTX, (ctx)); \
+    if (!(ctx)) { \
 	ossl_raise(rb_eRuntimeError, "STORE_CTX is out of scope!"); \
     } \
 } while (0)
 #define SafeGetX509StCtx(obj, storep) do { \
-    OSSL_Check_Kind(obj, cX509StoreContext); \
-    GetX509Store(obj, ctx); \
+    OSSL_Check_Kind((obj), cX509StoreContext); \
+    GetX509Store((obj), (ctx)); \
 } while (0)
 
 /*

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

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