ruby-changes:18892
From: akr <ko1@a...>
Date: Sun, 20 Feb 2011 00:47:28 +0900 (JST)
Subject: [ruby-changes:18892] Ruby:r30917 (trunk): * ext/openssl/ossl_bn.c: parenthesize macro arguments.
akr 2011-02-20 00:47:21 +0900 (Sun, 20 Feb 2011) New Revision: 30917 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30917 Log: * ext/openssl/ossl_bn.c: parenthesize macro arguments. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_bn.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30916) +++ ChangeLog (revision 30917) @@ -1,3 +1,7 @@ +Sun Feb 20 00:46:51 2011 Tanaka Akira <akr@f...> + + * ext/openssl/ossl_bn.c: parenthesize macro arguments. + Sat Feb 19 22:37:42 2011 CHIKANAGA Tomoyuki <nagachika00@g...> * vm_insnhelper.c (vm_check_if_namespace): guard temporary object Index: ext/openssl/ossl_bn.c =================================================================== --- ext/openssl/ossl_bn.c (revision 30916) +++ ext/openssl/ossl_bn.c (revision 30917) @@ -12,22 +12,22 @@ #include "ossl.h" #define WrapBN(klass, obj, bn) do { \ - if (!bn) { \ + if (!(bn)) { \ ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \ } \ - obj = Data_Wrap_Struct(klass, 0, BN_clear_free, bn); \ + (obj) = Data_Wrap_Struct((klass), 0, BN_clear_free, (bn)); \ } while (0) #define GetBN(obj, bn) do { \ - Data_Get_Struct(obj, BIGNUM, bn); \ - if (!bn) { \ + Data_Get_Struct((obj), BIGNUM, (bn)); \ + if (!(bn)) { \ ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \ } \ } while (0) #define SafeGetBN(obj, bn) do { \ - OSSL_Check_Kind(obj, cBN); \ - GetBN(obj, bn); \ + OSSL_Check_Kind((obj), cBN); \ + GetBN((obj), (bn)); \ } while (0) /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/