summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_cipher.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-20 10:59:48 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-20 10:59:48 +0000
commit408a903c99f602ae2cd14f8074fa54736ea88b45 (patch)
tree689c3d1c268cef86ca492dd16e41eddb190c21e5 /ext/openssl/ossl_cipher.c
parentc4cc4d31e618a97ec4d5655a8e543514c96bcecc (diff)
* ext/openssl/ossl_cipher.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_cipher.c')
-rw-r--r--ext/openssl/ossl_cipher.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index c164b8b..84b51a0 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -11,23 +11,23 @@
#include "ossl.h"
#define WrapCipher(obj, klass, ctx) \
- obj = Data_Wrap_Struct(klass, 0, ossl_cipher_free, ctx)
+ (obj) = Data_Wrap_Struct((klass), 0, ossl_cipher_free, (ctx))
#define MakeCipher(obj, klass, ctx) \
- obj = Data_Make_Struct(klass, EVP_CIPHER_CTX, 0, ossl_cipher_free, ctx)
+ (obj) = Data_Make_Struct((klass), EVP_CIPHER_CTX, 0, ossl_cipher_free, (ctx))
#define AllocCipher(obj, ctx) \
memset(DATA_PTR(obj) = (ctx) = ALLOC(EVP_CIPHER_CTX), 0, sizeof(EVP_CIPHER_CTX))
#define GetCipherInit(obj, ctx) do { \
- Data_Get_Struct(obj, EVP_CIPHER_CTX, ctx); \
+ Data_Get_Struct((obj), EVP_CIPHER_CTX, (ctx)); \
} while (0)
#define GetCipher(obj, ctx) do { \
- GetCipherInit(obj, ctx); \
- if (!ctx) { \
+ GetCipherInit((obj), (ctx)); \
+ if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "Cipher not inititalized!"); \
} \
} while (0)
#define SafeGetCipher(obj, ctx) do { \
- OSSL_Check_Kind(obj, cCipher); \
- GetCipher(obj, ctx); \
+ OSSL_Check_Kind((obj), cCipher); \
+ GetCipher((obj), (ctx)); \
} while (0)
/*