diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-17 12:33:07 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-17 12:33:07 +0000 |
commit | 520611984470ec8f1596a040262683ad3929399a (patch) | |
tree | 973ac1102e78216951b0c06a53fa285f744838d2 /ext/openssl/ossl.h | |
parent | 36a0a1a3f3d6ede4c8d42c3beb2e5c24ea649f3c (diff) |
* ext/openssl/ossl.h: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl.h')
-rw-r--r-- | ext/openssl/ossl.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 4bb18d5020..22d0818d7e 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -84,21 +84,21 @@ extern VALUE eOSSLError; * CheckTypes */ #define OSSL_Check_Kind(obj, klass) do {\ - if (!rb_obj_is_kind_of(obj, klass)) {\ + if (!rb_obj_is_kind_of((obj), (klass))) {\ ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected kind of %s)",\ rb_obj_classname(obj), rb_class2name(klass));\ }\ } while (0) #define OSSL_Check_Instance(obj, klass) do {\ - if (!rb_obj_is_instance_of(obj, klass)) {\ + if (!rb_obj_is_instance_of((obj), (klass))) {\ ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\ rb_obj_classname(obj), rb_class2name(klass));\ }\ } while (0) #define OSSL_Check_Same_Class(obj1, obj2) do {\ - if (!rb_obj_is_instance_of(obj1, rb_obj_class(obj2))) {\ + if (!rb_obj_is_instance_of((obj1), rb_obj_class(obj2))) {\ ossl_raise(rb_eTypeError, "wrong argument type");\ }\ } while (0) @@ -129,7 +129,7 @@ do{\ int len = RSTRING_LEN(str);\ int newlen = (p) - (unsigned char*)RSTRING_PTR(str);\ assert(newlen <= len);\ - rb_str_set_len(str, newlen);\ + rb_str_set_len((str), newlen);\ }while(0) /* @@ -180,13 +180,13 @@ extern VALUE dOSSL; } while (0) #define OSSL_Warning(fmt, ...) do { \ - OSSL_Debug(fmt, ##__VA_ARGS__); \ - rb_warning(fmt, ##__VA_ARGS__); \ + OSSL_Debug((fmt), ##__VA_ARGS__); \ + rb_warning((fmt), ##__VA_ARGS__); \ } while (0) #define OSSL_Warn(fmt, ...) do { \ - OSSL_Debug(fmt, ##__VA_ARGS__); \ - rb_warn(fmt, ##__VA_ARGS__); \ + OSSL_Debug((fmt), ##__VA_ARGS__); \ + rb_warn((fmt), ##__VA_ARGS__); \ } while (0) #else void ossl_debug(const char *, ...); |