ruby-changes:18930
From: akr <ko1@a...>
Date: Thu, 24 Feb 2011 23:03:41 +0900 (JST)
Subject: [ruby-changes:18930] Ruby:r30955 (trunk): * ext/openssl/ossl_hmac.c: parenthesize macro arguments.
akr 2011-02-24 23:03:34 +0900 (Thu, 24 Feb 2011) New Revision: 30955 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30955 Log: * ext/openssl/ossl_hmac.c: parenthesize macro arguments. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_hmac.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30954) +++ ChangeLog (revision 30955) @@ -1,3 +1,7 @@ +Thu Feb 24 23:02:55 2011 Tanaka Akira <akr@f...> + + * ext/openssl/ossl_hmac.c: parenthesize macro arguments. + Thu Feb 24 22:53:10 2011 Nobuyoshi Nakada <nobu@r...> * common.mk (love): for the birthday. Index: ext/openssl/ossl_hmac.c =================================================================== --- ext/openssl/ossl_hmac.c (revision 30954) +++ ext/openssl/ossl_hmac.c (revision 30955) @@ -13,16 +13,16 @@ #include "ossl.h" #define MakeHMAC(obj, klass, ctx) \ - obj = Data_Make_Struct(klass, HMAC_CTX, 0, ossl_hmac_free, ctx) + (obj) = Data_Make_Struct((klass), HMAC_CTX, 0, ossl_hmac_free, (ctx)) #define GetHMAC(obj, ctx) do { \ - Data_Get_Struct(obj, HMAC_CTX, ctx); \ - if (!ctx) { \ + Data_Get_Struct((obj), HMAC_CTX, (ctx)); \ + if (!(ctx)) { \ ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \ } \ } while (0) #define SafeGetHMAC(obj, ctx) do { \ - OSSL_Check_Kind(obj, cHMAC); \ - GetHMAC(obj, ctx); \ + OSSL_Check_Kind((obj), cHMAC); \ + GetHMAC((obj), (ctx)); \ } while (0) /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/