diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 13:23:13 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 13:23:13 +0000 |
commit | 479bf5e516644f4f278da3be13914592f1962eb0 (patch) | |
tree | 14baf4d21698cef9ab6434a759201bce131e88ee /time.c | |
parent | d66c22bfde282e23a74433bee835ad05f7328731 (diff) |
merges r29952 from trunk into ruby_1_9_2.
--
* time.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30268 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) @@ -1762,9 +1762,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) @@ -2703,7 +2703,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; |