summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/Encode/Encode.pm4
-rw-r--r--cpan/Encode/Encode.xs17
-rw-r--r--cpan/Encode/bin/enc2xs9
-rw-r--r--cpan/Encode/t/encoding.t9
5 files changed, 24 insertions, 17 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 2b2415a604..3669c356db 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -390,7 +390,7 @@ use File::Glob qw(:case);
},
'Encode' => {
- 'DISTRIBUTION' => 'DANKOGAI/Encode-2.64.tar.gz',
+ 'DISTRIBUTION' => 'DANKOGAI/Encode-2.65.tar.gz',
'FILES' => q[cpan/Encode],
'CUSTOMIZED' => [ qw( encoding.pm ) ],
},
diff --git a/cpan/Encode/Encode.pm b/cpan/Encode/Encode.pm
index 820d6f76c1..aea332e95b 100644
--- a/cpan/Encode/Encode.pm
+++ b/cpan/Encode/Encode.pm
@@ -1,10 +1,10 @@
#
-# $Id: Encode.pm,v 2.64 2014/10/29 15:37:54 dankogai Exp dankogai $
+# $Id: Encode.pm,v 2.65 2014/11/27 14:02:45 dankogai Exp $
#
package Encode;
use strict;
use warnings;
-our $VERSION = sprintf "%d.%02d", q$Revision: 2.64 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 2.65 $ =~ /(\d+)/g;
use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
use XSLoader ();
XSLoader::load( __PACKAGE__, $VERSION );
diff --git a/cpan/Encode/Encode.xs b/cpan/Encode/Encode.xs
index 32be9b8ab7..8463ccecbf 100644
--- a/cpan/Encode/Encode.xs
+++ b/cpan/Encode/Encode.xs
@@ -1,5 +1,5 @@
/*
- $Id: Encode.xs,v 2.31 2014/10/29 15:37:54 dankogai Exp dankogai $
+ $Id: Encode.xs,v 2.32 2014/11/27 14:08:33 dankogai Exp dankogai $
*/
#define PERL_NO_GET_CONTEXT
@@ -21,6 +21,8 @@
#define UNIMPLEMENTED(x,y) y x (SV *sv, char *encoding) { \
Perl_croak_nocontext("panic_unimplemented"); \
+ PERL_UNUSED_VAR(sv); \
+ PERL_UNUSED_VAR(encoding); \
return (y)0; /* fool picky compilers */ \
}
/**/
@@ -67,6 +69,10 @@ void
call_failure(SV * routine, U8 * done, U8 * dest, U8 * orig)
{
/* Exists for breakpointing */
+ PERL_UNUSED_VAR(routine);
+ PERL_UNUSED_VAR(done);
+ PERL_UNUSED_VAR(dest);
+ PERL_UNUSED_VAR(orig);
}
@@ -363,11 +369,11 @@ process_utf8(pTHX_ SV* dst, U8* s, U8* e, SV *check_sv,
if (strict && uv > PERL_UNICODE_MAX)
ulen = (STRLEN) -1;
#endif
- if (ulen == -1) {
+ if (ulen == (STRLEN) -1) {
if (strict) {
uv = utf8n_to_uvuni(s, e - s, &ulen,
UTF8_CHECK_ONLY | UTF8_ALLOW_NONSTRICT);
- if (ulen == -1)
+ if (ulen == (STRLEN) -1)
goto malformed_byte;
goto malformed;
}
@@ -507,7 +513,6 @@ PREINIT:
U8 *s;
U8 *e;
SV *dst;
- bool renewed = 0;
int check;
CODE:
{
@@ -568,6 +573,7 @@ Method_renew(obj)
SV * obj
CODE:
{
+ PERL_UNUSED_VAR(obj);
XSRETURN(1);
}
@@ -576,6 +582,7 @@ Method_renewed(obj)
SV * obj
CODE:
RETVAL = 0;
+ PERL_UNUSED_VAR(obj);
OUTPUT:
RETVAL
@@ -677,6 +684,7 @@ SV * obj
CODE:
{
/* encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj))); */
+ PERL_UNUSED_VAR(obj);
ST(0) = &PL_sv_no;
XSRETURN(1);
}
@@ -689,6 +697,7 @@ CODE:
/* encode_t *enc = INT2PTR(encode_t *, SvIV(SvRV(obj))); */
/* require_pv(PERLIO_FILENAME); */
+ PERL_UNUSED_VAR(obj);
eval_pv("require PerlIO::encoding", 0);
SPAGAIN;
diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
index 5e9f04a4a3..bed415e141 100644
--- a/cpan/Encode/bin/enc2xs
+++ b/cpan/Encode/bin/enc2xs
@@ -10,7 +10,7 @@ use warnings;
use Getopt::Std;
use Config;
my @orig_ARGV = @ARGV;
-our $VERSION = do { my @r = (q$Revision: 2.14 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 2.15 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
# These may get re-ordered.
# RAW is a do_now as inserted by &enter
@@ -701,7 +701,12 @@ sub addstrings
my $cpp = ($Config{d_cplusplus} || '') eq 'define';
my $var = $^O eq 'MacOS' || $cpp ? 'extern' : 'static';
my $const = $cpp ? '' : 'const';
- print $fh "$var $const encpage_t $name\[",scalar(@{$a->{'Entries'}}),"];\n";
+ my $ccflags = $Config{ccflags};
+ if (defined $Config{ccwarnflags}) {
+ $ccflags .= " " . $Config{ccwarnflags};
+ }
+ my $count = $ccflags =~ /-Wc\+\+-compat/ ? '' : scalar(@{$a->{'Entries'}});
+ print $fh "$var $const encpage_t $name\[$count];\n";
}
$a->{'DoneStrings'} = 1;
foreach my $b (@{$a->{'Entries'}})
diff --git a/cpan/Encode/t/encoding.t b/cpan/Encode/t/encoding.t
index 847c26f643..8c7f253377 100644
--- a/cpan/Encode/t/encoding.t
+++ b/cpan/Encode/t/encoding.t
@@ -14,7 +14,7 @@ BEGIN {
}
}
-print "1..33\n";
+print "1..31\n";
no warnings "deprecated";
use encoding "latin1"; # ignored (overwritten by the next line)
@@ -202,10 +202,3 @@ print "ok 28\n";
print $h1{"\x{3af}"} == 41 ? "ok 30\n" : "not ok 30\n";
print $h2{"\xdf"} == 42 ? "ok 31\n" : "not ok 31\n";
}
-
-# Order of finding the above-Latin1 code point should not matter: both should
-# assume Latin1/Unicode encoding
-print "not " if "\xDF\x{100}" =~ /\x{3af}\x{100}/;
-print "ok 32\n";
-print "not " if "\x{100}\xDF" =~ /\x{100}\x{3af}/;
-print "ok 33\n";