ruby-changes:18864
From: akr <ko1@a...>
Date: Thu, 17 Feb 2011 21:33:59 +0900 (JST)
Subject: [ruby-changes:18864] Ruby:r30889 (trunk): * ext/openssl/ossl.h: parenthesize macro arguments.
akr 2011-02-17 21:33:07 +0900 (Thu, 17 Feb 2011) New Revision: 30889 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30889 Log: * ext/openssl/ossl.h: parenthesize macro arguments. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl.h Index: ChangeLog =================================================================== --- ChangeLog (revision 30888) +++ ChangeLog (revision 30889) @@ -1,3 +1,7 @@ +Thu Feb 17 21:32:53 2011 Tanaka Akira <akr@f...> + + * ext/openssl/ossl.h: parenthesize macro arguments. + Wed Feb 16 20:37:48 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * eval_jump.c (rb_exec_end_proc): changed at_exit and END proc Index: ext/openssl/ossl.h =================================================================== --- ext/openssl/ossl.h (revision 30888) +++ ext/openssl/ossl.h (revision 30889) @@ -84,21 +84,21 @@ * 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 @@ 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 @@ } 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 *, ...); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/