diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-27 10:12:48 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-27 10:12:48 +0000 |
commit | cf869bc14d80dda4fea5390bb16ed44878e82100 (patch) | |
tree | d458fe7011e58ee967a0206c266ca90955c4eded /time.c | |
parent | 2451d735a79d7c5f4bdb019335b7083bd081df69 (diff) | |
download | ruby-cf869bc14d80dda4fea5390bb16ed44878e82100.tar.gz |
* time.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -184,7 +184,7 @@ quo(VALUE x, VALUE y) return ret; } -#define mulquo(x,y,z) ((y == z) ? x : quo(mul(x,y),z)) +#define mulquo(x,y,z) (((y) == (z)) ? (x) : quo(mul((x),(y)),(z))) static void divmodv(VALUE n, VALUE d, VALUE *q, VALUE *r) @@ -856,8 +856,8 @@ static int leap_year_p(long y); #define leap_year_v_p(y) leap_year_p(NUM2LONG(mod((y), INT2FIX(400)))) #ifdef HAVE_GMTIME_R -#define rb_gmtime_r(t, tm) gmtime_r(t, tm) -#define rb_localtime_r(t, tm) localtime_r(t, tm) +#define rb_gmtime_r(t, tm) gmtime_r((t), (tm)) +#define rb_localtime_r(t, tm) localtime_r((t), (tm)) #else static inline struct tm * rb_gmtime_r(const time_t *tp, struct tm *result) @@ -1799,9 +1799,9 @@ struct time_object { }; #define GetTimeval(obj, tobj) \ - TypedData_Get_Struct(obj, struct time_object, &time_data_type, tobj) + TypedData_Get_Struct((obj), struct time_object, &time_data_type, (tobj)) -#define IsTimeval(obj) rb_typeddata_is_kind_of(obj, &time_data_type) +#define IsTimeval(obj) rb_typeddata_is_kind_of((obj), &time_data_type) #define TIME_UTC_P(tobj) ((tobj)->gmt == 1) #define TIME_SET_UTC(tobj) ((tobj)->gmt = 1) @@ -2740,7 +2740,7 @@ find_time_t(struct tm *tptr, int utc_p, time_t *tp) int status; int tptr_tm_yday; -#define GUESS(p) (DEBUG_FIND_TIME_NUMGUESS_INC (utc_p ? gmtime_with_leapsecond(p, &result) : LOCALTIME(p, result))) +#define GUESS(p) (DEBUG_FIND_TIME_NUMGUESS_INC (utc_p ? gmtime_with_leapsecond((p), &result) : LOCALTIME((p), result))) guess_lo = TIMET_MIN; guess_hi = TIMET_MAX; |