Update Encode to CPAN version 2.42
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sat, 1 Jan 2011 10:37:04 +0000 (10:37 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sat, 1 Jan 2011 10:37:04 +0000 (10:37 +0000)
  [DELTA]

  $Revision: 2.42 $ $Date: 2010/12/31 22:48:48 $
  ! Encode.xs
  ! Unicode/Unicode.xs
    Applied: RT#64371: Update for 5.14 API changes
    http://rt.cpan.org/Ticket/Display.html?id=64371

Porting/Maintainers.pl
cpan/Encode/Changes
cpan/Encode/Encode.pm
cpan/Encode/Encode.xs
cpan/Encode/META.yml
cpan/Encode/Unicode/Unicode.xs
pod/perldelta.pod

index 50202c1..89deb84 100755 (executable)
@@ -528,7 +528,7 @@ use File::Glob qw(:case);
     'Encode' =>
        {
        'MAINTAINER'    => 'dankogai',
-       'DISTRIBUTION'  => 'DANKOGAI/Encode-2.41.tar.gz',
+       'DISTRIBUTION'  => 'DANKOGAI/Encode-2.42.tar.gz',
        'FILES'         => q[cpan/Encode],
        'UPSTREAM'      => 'cpan',
        },
index 6434a3a..a8be386 100644 (file)
@@ -1,12 +1,18 @@
 # Revision history for Perl extension Encode.
 #
-# $Id: Changes,v 2.41 2010/12/23 11:05:58 dankogai Exp dankogai $
+# $Id: Changes,v 2.42 2010/12/31 22:48:48 dankogai Exp dankogai $
 #
-$Revision: 2.41 $ $Date: 2010/12/23 11:05:58 $
-lib/Encode/MIME/Header.pm
+$Revision: 2.42 $ $Date: 2010/12/31 22:48:48 $
+! Encode.xs
+! Unicode/Unicode.xs
+  Applied: RT#64371: Update for 5.14 API changes
+  http://rt.cpan.org/Ticket/Display.html?id=64371
+
+2.41 2010/12/23 11:05:58
+! lib/Encode/MIME/Header.pm
   Applied: RT#63387 encode of MIME-Header inserts too much whitespace
   http://rt.cpan.org/Ticket/Display.html?id=63387
-t/Aliases.t lib/Encode/Alias.pm
+t/Aliases.t lib/Encode/Alias.pm
   Applied: RT#63286: Various Encode::Alias improvements
   http://rt.cpan.org/Ticket/Display.html?id=63286
 
index b5850f8..0888791 100644 (file)
@@ -1,10 +1,10 @@
 #
-# $Id: Encode.pm,v 2.41 2010/12/23 11:05:00 dankogai Exp $
+# $Id: Encode.pm,v 2.42 2010/12/31 22:48:10 dankogai Exp $
 #
 package Encode;
 use strict;
 use warnings;
-our $VERSION = sprintf "%d.%02d", q$Revision: 2.41 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 2.42 $ =~ /(\d+)/g;
 sub DEBUG () { 0 }
 use XSLoader ();
 XSLoader::load( __PACKAGE__, $VERSION );
index 1a672d6..723170c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- $Id: Encode.xs,v 2.19 2010/09/18 18:39:51 dankogai Exp $
+ $Id: Encode.xs,v 2.20 2010/12/31 22:48:48 dankogai Exp dankogai $
  */
 
 #define PERL_NO_GET_CONTEXT
 UNIMPLEMENTED(_encoded_utf8_to_bytes, I32)
 UNIMPLEMENTED(_encoded_bytes_to_utf8, I32)
 
-#define UTF8_ALLOW_STRICT 0
+#ifdef UTF8_DISALLOW_ILLEGAL_INTERCHANGE
+#   define UTF8_ALLOW_STRICT UTF8_DISALLOW_ILLEGAL_INTERCHANGE
+#else
+#   define UTF8_ALLOW_STRICT 0
+#endif
+
 #define UTF8_ALLOW_NONSTRICT (UTF8_ALLOW_ANY &                    \
                               ~(UTF8_ALLOW_CONTINUATION |         \
                                 UTF8_ALLOW_NON_CONTINUATION |     \
index a1b25e1..6ab4243 100644 (file)
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Encode
-version:            2.41
+version:            2.42
 abstract:           ~
 author:  []
 license:            unknown
index 9741626..07d7e25 100644 (file)
@@ -1,5 +1,5 @@
 /*
- $Id: Unicode.xs,v 2.6 2009/11/16 14:08:13 dankogai Exp $
+ $Id: Unicode.xs,v 2.7 2010/12/31 22:48:48 dankogai Exp dankogai $
  */
 
 #define PERL_NO_GET_CONTEXT
 #define isLoSurrogate(x)       (0xDC00 <= (x)  && (x) <= 0xDFFF )
 #define invalid_ucs2(x)         ( issurrogate(x) || 0xFFFF < (x) )
 
+/* For pre-5.14 source compatibility */
+#ifndef UNICODE_WARN_ILLEGAL_INTERCHANGE
+#   define UNICODE_WARN_ILLEGAL_INTERCHANGE 0
+#   define UTF8_DISALLOW_SURROGATE 0
+#   define UTF8_WARN_SURROGATE 0
+#   define UTF8_DISALLOW_FE_FF 0
+#   define UTF8_WARN_FE_FF 0
+#   define UTF8_WARN_NONCHAR 0
+#endif
+
 #define PERLIO_BUFSIZ 1024 /* XXX value comes from PerlIOEncode_get_base */
 
 /* Avoid wasting too much space in the result buffer */
@@ -255,7 +265,8 @@ CODE:
            resultbuflen = SvLEN(result);
        }
 
-       d = uvuni_to_utf8_flags(resultbuf+SvCUR(result), ord, 0);
+       d = uvuni_to_utf8_flags(resultbuf+SvCUR(result), ord,
+                                            UNICODE_WARN_ILLEGAL_INTERCHANGE);
        SvCUR_set(result, d - (U8 *)SvPVX(result));
     }
 
@@ -323,7 +334,11 @@ CODE:
     }
     while (s < e && s+UTF8SKIP(s) <= e) {
        STRLEN len;
-       UV ord = utf8n_to_uvuni(s, e-s, &len, 0);
+       UV ord = utf8n_to_uvuni(s, e-s, &len, (UTF8_DISALLOW_SURROGATE
+                                               |UTF8_WARN_SURROGATE
+                                               |UTF8_DISALLOW_FE_FF
+                                               |UTF8_WARN_FE_FF
+                                               |UTF8_WARN_NONCHAR));
        s += len;
        if (size != 4 && invalid_ucs2(ord)) {
            if (!issurrogate(ord)) {
index 7035257..42c4c42 100644 (file)
@@ -100,7 +100,7 @@ generation task.
 
 =item *
 
-C<Encode> has been upgraded from version 2.40 to 2.41
+C<Encode> has been upgraded from version 2.40 to 2.42
 
 =item *