Change 16214 by jhi@alpha on 2002/04/27 15:48:34
Upgrade to Encode 1.62.
Affected files ...
.... //depot/perl/ext/Encode/Changes#28 edit
.... //depot/perl/ext/Encode/Encode.pm#105 edit
.... //depot/perl/ext/Encode/Encode.xs#79 edit
Differences ...
==== //depot/perl/ext/Encode/Changes#28 (text) ====
Index: perl/ext/Encode/Changes
--- perl/ext/Encode/Changes.~1~ Sat Apr 27 10:00:05 2002
+++ perl/ext/Encode/Changes Sat Apr 27 10:00:05 2002
@@ -1,9 +1,18 @@
# Revision history for Perl extension Encode.
#
-# $Id: Changes,v 1.61 2002/04/26 03:02:04 dankogai Exp $
+# $Id: Changes,v 1.62 2002/04/27 11:17:39 dankogai Exp dankogai $
#
-$Revision: 1.61 $ $Date: 2002/04/26 03:02:04 $
+$Revision: 1.62 $ $Date: 2002/04/27 11:17:39 $
+! Encode.pm
+ encodings() now just check %ExtModule instead of eval{require}
+ all of them for ":all" to conserve more memory.
+! Encode.xs
+ more "%x" -> "%" UVxf stuff.
+! Encode.pm
+ s/=over2/=over 2/g # oops.
+
+1.61 2002/04/26 03:02:04
! t/mime-header.t
Now does decent tests besides use_ok()
! lib/Encode/Guess.pm t/guess.t
@@ -511,7 +520,7 @@
Typo fixes and improvements by jhi
Message-Id: <[EMAIL PROTECTED]>, et al.
-1.11 $Date: 2002/04/26 03:02:04 $
+1.11 $Date: 2002/04/27 11:17:39 $
+ t/encoding.t
+ t/jperl.t
! MANIFEST
==== //depot/perl/ext/Encode/Encode.pm#105 (text) ====
Index: perl/ext/Encode/Encode.pm
--- perl/ext/Encode/Encode.pm.~1~ Sat Apr 27 10:00:05 2002
+++ perl/ext/Encode/Encode.pm Sat Apr 27 10:00:05 2002
@@ -1,6 +1,6 @@
package Encode;
use strict;
-our $VERSION = do { my @r = (q$Revision: 1.61 $ =~ /\d+/g); sprintf "%d."."%02d" x
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.62 $ =~ /\d+/g); sprintf "%d."."%02d" x
+$#r, @r };
our $DEBUG = 0;
use XSLoader ();
XSLoader::load 'Encode';
@@ -53,17 +53,21 @@
sub encodings
{
my $class = shift;
- my @modules = (@_ and $_[0] eq ":all") ? values %ExtModule : @_;
- for my $mod (@modules){
- $mod =~ s,::,/,g or $mod = "Encode/$mod";
- $mod .= '.pm';
- $DEBUG and warn "about to require $mod;";
- eval { require $mod; };
+ my %enc;
+ if (@_ and $_[0] eq ":all"){
+ %enc = ( %Encoding, %ExtModule );
+ }else{
+ %enc = %Encoding;
+ for my $mod (map {m/::/o ? $_ : "Encode::$_" } @_){
+ $DEBUG and warn $mod;
+ for my $enc (keys %ExtModule){
+ $ExtModule{$enc} eq $mod and $enc{$enc} = $mod;
+ }
+ }
}
- my %modules = map {$_ => 1} @modules;
return
sort { lc $a cmp lc $b }
- grep {!/^(?:Internal|Unicode)$/o} keys %Encoding;
+ grep {!/^(?:Internal|Unicode|Guess)$/o} keys %enc;
}
sub perlio_ok{
==== //depot/perl/ext/Encode/Encode.xs#79 (text) ====
Index: perl/ext/Encode/Encode.xs
--- perl/ext/Encode/Encode.xs.~1~ Sat Apr 27 10:00:05 2002
+++ perl/ext/Encode/Encode.xs Sat Apr 27 10:00:05 2002
@@ -1,5 +1,5 @@
/*
- $Id: Encode.xs,v 1.39 2002/04/26 03:02:04 dankogai Exp $
+ $Id: Encode.xs,v 1.40 2002/04/27 11:17:39 dankogai Exp dankogai $
*/
#define PERL_NO_GET_CONTEXT
@@ -169,21 +169,23 @@
else {
if (check & ENCODE_DIE_ON_ERR){
Perl_croak(
- aTHX_ "%s \"\\x%02X\" does not map to Unicode (%d)",
+ aTHX_ "%s \"\\x%02" UVXf
+ "\" does not map to Unicode (%d)",
enc->name[0], (U8) s[slen], code);
}else{
if (check & ENCODE_RETURN_ON_ERR){
if (check & ENCODE_WARN_ON_ERR){
Perl_warner(
aTHX_ packWARN(WARN_UTF8),
- "%s \"\\x%02X\" does not map to Unicode (%d)",
+ "%s \"\\x%02" UVXf
+ "\" does not map to Unicode (%d)",
enc->name[0], (U8) s[slen], code);
}
goto ENCODE_SET_SRC;
}else if (check &
(ENCODE_PERLQQ|ENCODE_HTMLCREF|ENCODE_XMLCREF)){
SV* perlqq =
- sv_2mortal(newSVpvf("\\x%02X", s[slen]));
+ sv_2mortal(newSVpvf("\\x%02" UVXf, s[slen]));
sdone += slen + 1;
ddone += dlen + SvCUR(perlqq);
sv_catsv(dst, perlqq);
End of Patch.