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:
parent
18f39f4e57
commit
dbf889812b
2 changed files with 9 additions and 5 deletions
|
@ -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>
|
Thu Feb 24 22:53:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (love): for the birthday.
|
* common.mk (love): for the birthday.
|
||||||
|
|
|
@ -13,16 +13,16 @@
|
||||||
#include "ossl.h"
|
#include "ossl.h"
|
||||||
|
|
||||||
#define MakeHMAC(obj, klass, ctx) \
|
#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 { \
|
#define GetHMAC(obj, ctx) do { \
|
||||||
Data_Get_Struct(obj, HMAC_CTX, ctx); \
|
Data_Get_Struct((obj), HMAC_CTX, (ctx)); \
|
||||||
if (!ctx) { \
|
if (!(ctx)) { \
|
||||||
ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
|
ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define SafeGetHMAC(obj, ctx) do { \
|
#define SafeGetHMAC(obj, ctx) do { \
|
||||||
OSSL_Check_Kind(obj, cHMAC); \
|
OSSL_Check_Kind((obj), cHMAC); \
|
||||||
GetHMAC(obj, ctx); \
|
GetHMAC((obj), (ctx)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue