mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_digest.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
06aeddaf92
commit
b7af3f6f0c
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Feb 22 21:39:28 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/openssl/ossl_digest.c: parenthesize macro arguments.
|
||||
|
||||
Tue Feb 22 14:34:26 2011 Shota Fukumori (sora_h) <sorah@tubusu.net>
|
||||
|
||||
* lib/test/unit.rb: Fix merging miss.
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
#include "ossl.h"
|
||||
|
||||
#define GetDigest(obj, ctx) do { \
|
||||
Data_Get_Struct(obj, EVP_MD_CTX, ctx); \
|
||||
if (!ctx) { \
|
||||
Data_Get_Struct((obj), EVP_MD_CTX, (ctx)); \
|
||||
if (!(ctx)) { \
|
||||
ossl_raise(rb_eRuntimeError, "Digest CTX wasn't initialized!"); \
|
||||
} \
|
||||
} while (0)
|
||||
#define SafeGetDigest(obj, ctx) do { \
|
||||
OSSL_Check_Kind(obj, cDigest); \
|
||||
GetDigest(obj, ctx); \
|
||||
OSSL_Check_Kind((obj), cDigest); \
|
||||
GetDigest((obj), (ctx)); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue