diff options
author | Steve Hay <SteveHay@planit.com> | 2009-02-02 08:59:11 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2009-02-02 08:59:11 +0000 |
commit | a37eaad4a1b6f0ad86c6d3d07c6f0368a3d4577c (patch) | |
tree | 2229d90cb3810a4ca4a7a4e0be6b50ac7e638aec /ext/Encode | |
parent | d8bf0b8cc0654f404eb597a952c50e72976fd4fa (diff) | |
download | perl-a37eaad4a1b6f0ad86c6d3d07c6f0368a3d4577c.tar.gz |
Upgrade to Encode-2.29.
Diffstat (limited to 'ext/Encode')
-rw-r--r-- | ext/Encode/Changes | 26 | ||||
-rw-r--r-- | ext/Encode/Encode.pm | 4 | ||||
-rw-r--r-- | ext/Encode/Unicode/Unicode.xs | 39 | ||||
-rw-r--r-- | ext/Encode/lib/Encode/MIME/Header.pm | 4 | ||||
-rw-r--r-- | ext/Encode/t/mime-header.t | 2 |
5 files changed, 50 insertions, 25 deletions
diff --git a/ext/Encode/Changes b/ext/Encode/Changes index a65c47ea15..69ffd5d02d 100644 --- a/ext/Encode/Changes +++ b/ext/Encode/Changes @@ -1,12 +1,27 @@ # Revision history for Perl extension Encode. # -# $Id: Changes,v 2.27 2009/01/21 22:55:07 dankogai Exp dankogai $ +# $Id: Changes,v 2.29 2009/02/01 13:14:37 dankogai Exp $ # -$Revision: 2.27 $ $Date: 2009/01/21 22:55:07 $ +$Revision: 2.29 $ $Date: 2009/02/01 13:14:37 $ +! Encode.pm + VERSION++ just to make PAUSE happy + Message-Id: <877i4anwwt.fsf@k75.linux.bogus> + +2.28 Date: 2009/02/01 12:30:18 +! Unicode/Unicode.xs + Latest refactoring broke the backward compatibility + w/ Perl 5.8.6 and before now restored + Message-Id: <1233185156.DABa130.74940@basic2.hostingcompartido.com> + Message-Id: <693254b90902010027x277a5d0fm4f5700ba2f276239@mail.gmail.com> +! lib/Encode/MIME/Header.pm + Addressed: Split header lines are joined incorrectly + http://rt.cpan.org/Ticket/Display.html?id=42902 + +2.27 2009/01/21 22:55:07 ! lib/Encode/MIME/Header.pm t/mime-header.t Addressed: Encode::MIME::Header MIME-Q encoding truncates trailing zeros in some circumstances - http://rt.cpan.org/Ticket/Display.html?id=342627 + http://rt.cpan.org/Ticket/Display.html?id=42627 ! lib/Encode/Alias.pm Added alias: unicode-1-1-utf-7 http://rt.cpan.org/Ticket/Display.html?id=38558 @@ -19,13 +34,12 @@ $Revision: 2.27 $ $Date: 2009/01/21 22:55:07 $ ! lib/Encode/Guess.pm t/guess.t Addressed:Empty file should produce an error message http://rt.cpan.org/Ticket/Display.html?id=38652 - - -2.26 2008/07/01 20:56:17 ! Unicode/Unicode.xs AUTHORS Refactored by Alex Davies http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-10/msg00745.html Message-Id: <7637669B2E3D46B187591747DA27F4C8@Amelie> + +2.26 2008/07/01 20:56:17 ! Encode.pm Absense of Encode::ConfigLocal no longer carps no matter what. http://bugzilla.redhat.com/show_bug.cgi?id=435505#c2 diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 878536bf42..1c6e7c84bc 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -1,10 +1,10 @@ # -# $Id: Encode.pm,v 2.27 2009/01/21 22:55:07 dankogai Exp dankogai $ +# $Id: Encode.pm,v 2.29 2009/02/01 13:10:07 dankogai Exp $ # package Encode; use strict; use warnings; -our $VERSION = sprintf "%d.%02d", q$Revision: 2.27 $ =~ /(\d+)/g; +our $VERSION = sprintf "%d.%02d", q$Revision: 2.29 $ =~ /(\d+)/g; sub DEBUG () { 0 } use XSLoader (); XSLoader::load( __PACKAGE__, $VERSION ); diff --git a/ext/Encode/Unicode/Unicode.xs b/ext/Encode/Unicode/Unicode.xs index da069c162b..3283cedf80 100644 --- a/ext/Encode/Unicode/Unicode.xs +++ b/ext/Encode/Unicode/Unicode.xs @@ -1,5 +1,5 @@ /* - $Id: Unicode.xs,v 2.4 2009/01/21 22:55:07 dankogai Exp dankogai $ + $Id: Unicode.xs,v 2.5 2009/02/01 13:14:41 dankogai Exp dankogai $ */ #define PERL_NO_GET_CONTEXT @@ -21,19 +21,30 @@ #define PERLIO_BUFSIZ 1024 /* XXX value comes from PerlIOEncode_get_base */ /* Avoid wasting too much space in the result buffer */ -static void -shrink_buffer(SV *result) -{ - if (SvLEN(result) > 42 + SvCUR(result)) { - char *buf; - STRLEN datalen = 1 + SvCUR(result); /* include the NUL byte */ - STRLEN buflen = PERL_STRLEN_ROUNDUP(datalen); - Newx(buf, buflen, char); - Copy(SvPVX(result), buf, datalen, char); - Safefree(SvPVX(result)); - SvPV_set(result, buf); - SvLEN_set(result, buflen); - } +/* static void */ +/* shrink_buffer(SV *result) */ +/* { */ +/* if (SvLEN(result) > 42 + SvCUR(result)) { */ +/* char *buf; */ +/* STRLEN len = 1 + SvCUR(result); /\* include the NUL byte *\/ */ +/* New(0, buf, len, char); */ +/* Copy(SvPVX(result), buf, len, char); */ +/* Safefree(SvPVX(result)); */ +/* SvPV_set(result, buf); */ +/* SvLEN_set(result, len); */ +/* } */ +/* } */ + +#define shrink_buffer(result) { \ + if (SvLEN(result) > 42 + SvCUR(result)) { \ + char *newpv; \ + STRLEN newlen = 1 + SvCUR(result); /* include the NUL byte */ \ + New(0, newpv, newlen, char); \ + Copy(SvPVX(result), newpv, newlen, char); \ + Safefree(SvPVX(result)); \ + SvPV_set(result, newpv); \ + SvLEN_set(result, newlen); \ + } \ } static UV diff --git a/ext/Encode/lib/Encode/MIME/Header.pm b/ext/Encode/lib/Encode/MIME/Header.pm index 4742a72cac..e9bf93b44c 100644 --- a/ext/Encode/lib/Encode/MIME/Header.pm +++ b/ext/Encode/lib/Encode/MIME/Header.pm @@ -3,7 +3,7 @@ use strict; use warnings; no warnings 'redefine'; -our $VERSION = do { my @r = ( q$Revision: 2.6 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; +our $VERSION = do { my @r = ( q$Revision: 2.7 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; use Encode qw(find_encoding encode_utf8 decode_utf8); use MIME::Base64; use Carp; @@ -44,7 +44,7 @@ sub decode($$;$) { $str =~ s/\?=\s+=\?/\?==\?/gos; # multi-line header to single line - $str =~ s/(:?\r|\n|\r\n)[ \t]//gos; + $str =~ s/(?:\r|\n|\r\n)[ \t]+//gos; 1 while ( $str =~ s/(\=\?[0-9A-Za-z\-_]+\?[Qq]\?)(.*?)\?\=\1(.*?)\?\=/$1$2$3\?\=/ ) diff --git a/ext/Encode/t/mime-header.t b/ext/Encode/t/mime-header.t index a69e176853..47d77ca56c 100644 --- a/ext/Encode/t/mime-header.t +++ b/ext/Encode/t/mime-header.t @@ -1,5 +1,5 @@ # -# $Id: mime-header.t,v 2.4 2009/01/21 22:55:07 dankogai Exp dankogai $ +# $Id: mime-header.t,v 2.4 2009/01/21 22:55:07 dankogai Exp $ # This script is written in utf8 # BEGIN { |