summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog4
-rw-r--r--ext/openssl/ossl_cipher.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 05051696ad..c2655d79f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Feb 20 19:59:32 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/openssl/ossl_cipher.c: parenthesize macro arguments.
+
Sun Feb 20 16:26:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (exec_recursive): prevent temporary objects from GC.
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index c164b8b0a3..84b51a0101 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)
/*