ruby-changes:11637
From: akr <ko1@a...>
Date: Sat, 25 Apr 2009 16:04:15 +0900 (JST)
Subject: [ruby-changes:11637] Ruby:r23275 (trunk): * time.c (TIME_COPY_GMT): new macro.
akr 2009-04-25 16:04:02 +0900 (Sat, 25 Apr 2009) New Revision: 23275 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23275 Log: * time.c (TIME_COPY_GMT): new macro. (time_s_at): use TIME_COPY_GMT. (time_succ): ditto. Modified files: trunk/ChangeLog trunk/time.c Index: time.c =================================================================== --- time.c (revision 23274) +++ time.c (revision 23275) @@ -1002,6 +1002,8 @@ #define TIME_LOCALTIME_P(tobj) ((tobj)->gmt == 0) #define TIME_SET_LOCALTIME(tobj) ((tobj)->gmt = 0) +#define TIME_COPY_GMT(tobj1, tobj2) ((tobj1)->gmt = (tobj2)->gmt) + static VALUE time_get_tm(VALUE, struct time_object *); #define MAKE_TM(time, tobj) \ do { \ @@ -1359,7 +1361,7 @@ GetTimeval(time, tobj); t = time_new_timev(klass, tobj->timev); GetTimeval(t, tobj2); - tobj2->gmt = tobj->gmt; + TIME_COPY_GMT(tobj2, tobj); } else { timev = num_exact(time); @@ -2450,7 +2452,7 @@ GetTimeval(time, tobj); time = time_new_timev(rb_cTime, add(tobj->timev, INT2FIX(1))); GetTimeval(time, tobj2); - tobj2->gmt = tobj->gmt; + TIME_COPY_GMT(tobj2, tobj); return time; } Index: ChangeLog =================================================================== --- ChangeLog (revision 23274) +++ ChangeLog (revision 23275) @@ -1,3 +1,9 @@ +Sat Apr 25 16:03:21 2009 Tanaka Akira <akr@f...> + + * time.c (TIME_COPY_GMT): new macro. + (time_s_at): use TIME_COPY_GMT. + (time_succ): ditto. + Sat Apr 25 15:54:04 2009 Tanaka Akira <akr@f...> * time.c (time_mload): use TIME_SET_UTC. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/