diff --git a/ChangeLog b/ChangeLog index 7969356c1f..69dfc40c1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Apr 9 18:01:36 2011 Tanaka Akira + + * include/ruby/util.h: parenthesize macro arguments. + Fri Apr 8 16:01:56 2011 NARUSE, Yui * ext/stringio/stringio.c (strio_getline): check whether str is diff --git a/include/ruby/util.h b/include/ruby/util.h index b025fb61ec..40f044d3cb 100644 --- a/include/ruby/util.h +++ b/include/ruby/util.h @@ -49,9 +49,9 @@ extern "C" { #pragma GCC visibility push(default) #endif -#define scan_oct(s,l,e) (int)ruby_scan_oct(s,l,e) +#define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e))) unsigned long ruby_scan_oct(const char *, size_t, size_t *); -#define scan_hex(s,l,e) (int)ruby_scan_hex(s,l,e) +#define scan_hex(s,l,e) ((int)ruby_scan_hex((s),(l),(e))) unsigned long ruby_scan_hex(const char *, size_t, size_t *); #if defined(__CYGWIN32__) || defined(_WIN32) @@ -65,7 +65,7 @@ void ruby_setenv(const char *, const char *); void ruby_unsetenv(const char *); #undef setenv #undef unsetenv -#define setenv(name,val) ruby_setenv(name,val) +#define setenv(name,val) ruby_setenv((name),(val)) #define unsetenv(name,val) ruby_unsetenv(name); char *ruby_strdup(const char *); @@ -77,7 +77,7 @@ char *ruby_getcwd(void); double ruby_strtod(const char *, char **); #undef strtod -#define strtod(s,e) ruby_strtod(s,e) +#define strtod(s,e) ruby_strtod((s),(e)) #if defined _MSC_VER && _MSC_VER >= 1300 #pragma warning(push)