ruby-changes:8885
From: yugui <ko1@a...>
Date: Sun, 30 Nov 2008 18:25:48 +0900 (JST)
Subject: [ruby-changes:8885] Ruby:r20421 (ruby_1_9_1): merges r20367 from trunk into ruby_1_9_1.
yugui 2008-11-30 18:24:34 +0900 (Sun, 30 Nov 2008) New Revision: 20421 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20421 Log: merges r20367 from trunk into ruby_1_9_1. * strftime.c (STRFTIME): use rb_strftime() recursively, instead of platform's strftime(). Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/strftime.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20420) +++ ruby_1_9_1/ChangeLog (revision 20421) @@ -1,3 +1,8 @@ +Wed Nov 26 23:15:47 2008 Yukihiro Matsumoto <matz@r...> + + * strftime.c (STRFTIME): use rb_strftime() recursively, instead of + platform's strftime(). + Wed Nov 26 22:46:23 2008 Yukihiro Matsumoto <matz@r...> * ext/bigdecimal/bigdecimal.c (VpException): bigdecimal zero Index: ruby_1_9_1/strftime.c =================================================================== --- ruby_1_9_1/strftime.c (revision 20420) +++ ruby_1_9_1/strftime.c (revision 20421) @@ -291,9 +291,9 @@ if (l < 0) goto err; \ s += l; \ } while (0) -#define STRFTIME(fmt, tm) \ +#define STRFTIME(fmt) \ do { \ - i = strftime(s, endp - s, fmt, tm); \ + i = rb_strftime(s, endp - s, fmt, timeptr, ts, gmt); \ if (!i) return 0; \ if (precision > i) {\ memmove(s + precision - i, s, i);\ @@ -370,7 +370,7 @@ break; case 'c': /* appropriate date and time representation */ - STRFTIME("%a %b %e %H:%M:%S %Y", timeptr); + STRFTIME("%a %b %e %H:%M:%S %Y"); continue; case 'd': /* day of the month, 01 - 31 */ @@ -444,11 +444,11 @@ continue; case 'x': /* appropriate date representation */ - STRFTIME("%m/%d/%y", timeptr); + STRFTIME("%m/%d/%y"); continue; case 'X': /* appropriate time representation */ - STRFTIME("%H:%M:%S", timeptr); + STRFTIME("%H:%M:%S"); continue; case 'y': /* year without a century, 00 - 99 */ @@ -581,7 +581,7 @@ continue; case 'D': /* date as %m/%d/%y */ - STRFTIME("%m/%d/%y", timeptr); + STRFTIME("%m/%d/%y"); continue; case 'e': /* day of month, blank padded */ @@ -589,15 +589,15 @@ continue; case 'r': /* time as %I:%M:%S %p */ - STRFTIME("%I:%M:%S %p", timeptr); + STRFTIME("%I:%M:%S %p"); continue; case 'R': /* time as %H:%M */ - STRFTIME("%H:%M", timeptr); + STRFTIME("%H:%M"); continue; case 'T': /* time as %H:%M:%S */ - STRFTIME("%H:%M:%S", timeptr); + STRFTIME("%H:%M:%S"); continue; #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/