summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_pkey.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-07 08:39:39 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-07 08:39:39 +0000
commiteb807d42eca121df22f72b95465bba52a4e7fefa (patch)
tree35b722bc6c94d3b9c5f8f80d41e889c591a80450 /ext/openssl/ossl_pkey.h
parentc414d861c109ff546e2bc8c7264859907d6e0f76 (diff)
* gc.c (rb_gc_set_params): allow GC parameter configuration by
environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey.h')
-rw-r--r--ext/openssl/ossl_pkey.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/openssl/ossl_pkey.h b/ext/openssl/ossl_pkey.h
index 5e3329d326..67ff1fddd0 100644
--- a/ext/openssl/ossl_pkey.h
+++ b/ext/openssl/ossl_pkey.h
@@ -21,21 +21,21 @@ extern ID id_private_q;
#define OSSL_PKEY_IS_PRIVATE(obj) (rb_iv_get((obj), "private") == Qtrue)
#define WrapPKey(klass, obj, pkey) do { \
- if (!(pkey)) { \
+ if (!pkey) { \
rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \
} \
- (obj) = Data_Wrap_Struct((klass), 0, EVP_PKEY_free, (pkey)); \
+ obj = Data_Wrap_Struct(klass, 0, EVP_PKEY_free, pkey); \
OSSL_PKEY_SET_PUBLIC(obj); \
} while (0)
#define GetPKey(obj, pkey) do {\
- Data_Get_Struct((obj), EVP_PKEY, (pkey));\
- if (!(pkey)) { \
+ Data_Get_Struct(obj, EVP_PKEY, pkey);\
+ if (!pkey) { \
rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!");\
} \
} while (0)
#define SafeGetPKey(obj, pkey) do { \
- OSSL_Check_Kind((obj), cPKey); \
- GetPKey((obj), (pkey)); \
+ OSSL_Check_Kind(obj, cPKey); \
+ GetPKey(obj, pkey); \
} while (0)
void ossl_generate_cb(int, int, void *);
@@ -134,8 +134,8 @@ static VALUE ossl_##keytype##_set_##name(VALUE self, VALUE bignum) \
#define DEF_OSSL_PKEY_BN(class, keytype, name) \
do { \
- rb_define_method((class), #name, ossl_##keytype##_get_##name, 0); \
- rb_define_method((class), #name "=", ossl_##keytype##_set_##name, 1);\
+ rb_define_method(class, #name, ossl_##keytype##_get_##name, 0); \
+ rb_define_method(class, #name "=", ossl_##keytype##_set_##name, 1);\
} while (0)
#endif /* _OSSL_PKEY_H_ */