From 520611984470ec8f1596a040262683ad3929399a Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 17 Feb 2011 12:33:07 +0000 Subject: * ext/openssl/ossl.h: parenthesize macro arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ext/openssl/ossl.h') 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 *, ...); -- cgit v1.2.3