1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/ossl_hmac.c: parenthesize macro arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-02-24 14:03:34 +00:00
parent 18f39f4e57
commit dbf889812b
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
Thu Feb 24 23:02:55 2011 Tanaka Akira <akr@fsij.org>
* ext/openssl/ossl_hmac.c: parenthesize macro arguments.
Thu Feb 24 22:53:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (love): for the birthday.

View file

@ -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)
/*