In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/74c2567ea04065ba1e35ab395fe543042852be14?hp=7b00711fc6f174fa5decef23606eea519c272aa4>
- Log ----------------------------------------------------------------- commit 74c2567ea04065ba1e35ab395fe543042852be14 Author: Steve Peters <[email protected]> Date: Thu Oct 15 09:50:42 2009 -0500 Hmmm... this may be a heisenbug. Works on some terminals but not others. This reverts commit 9e8c01f558a03902ff2f54935fd7e6dcc7ec656c. ----------------------------------------------------------------------- Summary of changes: ext/POSIX/POSIX.pm | 2 +- ext/POSIX/POSIX.xs | 6 +++--- ext/POSIX/t/time.t | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index b410fd9..120769c 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our(@ISA, %EXPORT_TAGS, @EXPORT_OK, @EXPORT, $AUTOLOAD, %SIGRT) = (); -our $VERSION = "1.18"; +our $VERSION = "1.17"; use AutoLoader; diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 14b24ff..6de3588 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1781,7 +1781,7 @@ mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1) # ST(0) = sv_2mortal(newSVpv(...)) void strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) - SV * fmt + char * fmt int sec int min int hour @@ -1793,9 +1793,9 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) int isdst CODE: { - char *buf = my_strftime(SvPVutf8_nolen(fmt), sec, min, hour, mday, mon, year, wday, yday, isdst); + char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst); if (buf) { - ST(0) = sv_2mortal(newSVpvn_utf8(buf, strlen(buf), SvUTF8(fmt))); + ST(0) = sv_2mortal(newSVpv(buf, 0)); Safefree(buf); } } diff --git a/ext/POSIX/t/time.t b/ext/POSIX/t/time.t index b1bdee2..103a161 100644 --- a/ext/POSIX/t/time.t +++ b/ext/POSIX/t/time.t @@ -4,7 +4,7 @@ use strict; use Config; use POSIX; -use Test::More tests => 10; +use Test::More tests => 9; # go to UTC to avoid DST issues around the world when testing. SUS3 says that # null should get you UTC, but some environments want the explicit names. @@ -39,8 +39,6 @@ my $orig_loc = setlocale(LC_TIME, "C") || die "Cannot setlocale() to C: $!"; my $jan_16 = 15 * 86400; is(ctime($jan_16), strftime("%a %b %d %H:%M:%S %Y\n", localtime($jan_16)), "get ctime() equal to strftime()"); -is(strftime("%Yå¹´%mæ%dæ¥", localtime($jan_16)), "1970å¹´01æ16æ¥", - "strftime() can handle unicode chars in the format string"); setlocale(LC_TIME, $orig_loc) || die "Cannot setlocale() back to orig: $!"; # clock() seems to have different definitions of what it does between POSIX -- Perl5 Master Repository
