aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkey_ec.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-06 13:21:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-06 13:21:31 +0000
commitdd9f5e87145f224bd3b95ced4374d9ca1a77c6e1 (patch)
tree3cb51eabad7f1dbfd4b5acd2f4637bf7dd5fbef0 /ext/openssl/ossl_pkey_ec.c
parent97f07f096843beec98c13063a2d561e017a4ce6b (diff)
downloadruby-dd9f5e87145f224bd3b95ced4374d9ca1a77c6e1.tar.gz
* ext/openssl/ossl_pkey_ec.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey_ec.c')
-rw-r--r--ext/openssl/ossl_pkey_ec.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 8ba51d992d..24f3583fca 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -22,70 +22,70 @@ typedef struct {
#define GetPKeyEC(obj, pkey) do { \
- GetPKey(obj, pkey); \
- if (EVP_PKEY_type(pkey->type) != EVP_PKEY_EC) { \
+ GetPKey((obj), (pkey)); \
+ if (EVP_PKEY_type((pkey)->type) != EVP_PKEY_EC) { \
ossl_raise(rb_eRuntimeError, "THIS IS NOT A EC PKEY!"); \
} \
} while (0)
#define SafeGet_ec_group(obj, group) do { \
- OSSL_Check_Kind(obj, cEC_GROUP); \
- Data_Get_Struct(obj, ossl_ec_group, group); \
+ OSSL_Check_Kind((obj), cEC_GROUP); \
+ Data_Get_Struct((obj), ossl_ec_group, (group)); \
} while(0)
#define Get_EC_KEY(obj, key) do { \
EVP_PKEY *pkey; \
- GetPKeyEC(obj, pkey); \
- key = pkey->pkey.ec; \
+ GetPKeyEC((obj), pkey); \
+ (key) = pkey->pkey.ec; \
} while(0)
#define Require_EC_KEY(obj, key) do { \
- Get_EC_KEY(obj, key); \
- if (key == NULL) \
+ Get_EC_KEY((obj), (key)); \
+ if ((key) == NULL) \
rb_raise(eECError, "EC_KEY is not initialized"); \
} while(0)
#define SafeRequire_EC_KEY(obj, key) do { \
- OSSL_Check_Kind(obj, cEC); \
- Require_EC_KEY(obj, key); \
+ OSSL_Check_Kind((obj), cEC); \
+ Require_EC_KEY((obj), (key)); \
} while (0)
#define Get_EC_GROUP(obj, g) do { \
ossl_ec_group *ec_group; \
- Data_Get_Struct(obj, ossl_ec_group, ec_group); \
+ Data_Get_Struct((obj), ossl_ec_group, ec_group); \
if (ec_group == NULL) \
rb_raise(eEC_GROUP, "missing ossl_ec_group structure"); \
- g = ec_group->group; \
+ (g) = ec_group->group; \
} while(0)
#define Require_EC_GROUP(obj, group) do { \
- Get_EC_GROUP(obj, group); \
- if (group == NULL) \
+ Get_EC_GROUP((obj), (group)); \
+ if ((group) == NULL) \
rb_raise(eEC_GROUP, "EC_GROUP is not initialized"); \
} while(0)
#define SafeRequire_EC_GROUP(obj, group) do { \
- OSSL_Check_Kind(obj, cEC_GROUP); \
- Require_EC_GROUP(obj, group); \
+ OSSL_Check_Kind((obj), cEC_GROUP); \
+ Require_EC_GROUP((obj), (group)); \
} while(0)
#define Get_EC_POINT(obj, p) do { \
ossl_ec_point *ec_point; \
- Data_Get_Struct(obj, ossl_ec_point, ec_point); \
+ Data_Get_Struct((obj), ossl_ec_point, ec_point); \
if (ec_point == NULL) \
rb_raise(eEC_POINT, "missing ossl_ec_point structure"); \
- p = ec_point->point; \
+ (p) = ec_point->point; \
} while(0)
#define Require_EC_POINT(obj, point) do { \
- Get_EC_POINT(obj, point); \
- if (point == NULL) \
+ Get_EC_POINT((obj), (point)); \
+ if ((point) == NULL) \
rb_raise(eEC_POINT, "EC_POINT is not initialized"); \
} while(0)
#define SafeRequire_EC_POINT(obj, point) do { \
- OSSL_Check_Kind(obj, cEC_POINT); \
- Require_EC_POINT(obj, point); \
+ OSSL_Check_Kind((obj), cEC_POINT); \
+ Require_EC_POINT((obj), (point)); \
} while(0)
VALUE cEC;