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

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-02-19 15:47:21 +00:00
parent e3cc834486
commit 1343f8c536
2 changed files with 10 additions and 6 deletions

View file

@ -1,3 +1,7 @@
Sun Feb 20 00:46:51 2011 Tanaka Akira <akr@fsij.org>
* ext/openssl/ossl_bn.c: parenthesize macro arguments.
Sat Feb 19 22:37:42 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
* vm_insnhelper.c (vm_check_if_namespace): guard temporary object

View file

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