develooper Front page | perl.perl5.changes | Postings from March 2019

[perl.git] branch blead updated. v5.29.8-81-ge06f52f05d

From:
James Keenan via perl5-changes
Date:
March 13, 2019 02:11
Subject:
[perl.git] branch blead updated. v5.29.8-81-ge06f52f05d
Message ID:
E1h3tMA-0000qa-7n@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/e06f52f05dbbeec7219ccfa7dc8a8b05669c6f80?hp=870fe793ff778e4d1f8588405fe06cfad95d9579>

- Log -----------------------------------------------------------------
commit e06f52f05dbbeec7219ccfa7dc8a8b05669c6f80
Author: Dan Kogai <dankogai@dan.co.jp>
Date:   Tue Mar 12 22:09:18 2019 -0400

    Encode: synch with CPAN version 3.01

-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl      |  2 +-
 cpan/Encode/Encode.pm       |  4 ++--
 cpan/Encode/Encode.xs       | 12 ++++++------
 cpan/Encode/Encode/encode.h | 19 ++++++++++++-------
 4 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index f0fbc52ad9..7562a26984 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -386,7 +386,7 @@ use File::Glob qw(:case);
     },
 
     'Encode' => {
-        'DISTRIBUTION' => 'DANKOGAI/Encode-3.00.tar.gz',
+        'DISTRIBUTION' => 'DANKOGAI/Encode-3.01.tar.gz',
         'FILES'        => q[cpan/Encode],
     },
 
diff --git a/cpan/Encode/Encode.pm b/cpan/Encode/Encode.pm
index 6d240b3bc1..bc566879e3 100644
--- a/cpan/Encode/Encode.pm
+++ b/cpan/Encode/Encode.pm
@@ -1,5 +1,5 @@
 #
-# $Id: Encode.pm,v 3.00 2019/01/31 04:49:28 dankogai Exp $
+# $Id: Encode.pm,v 3.01 2019/03/13 00:25:25 dankogai Exp $
 #
 package Encode;
 use strict;
@@ -7,7 +7,7 @@ use warnings;
 use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
 our $VERSION;
 BEGIN {
-    $VERSION = sprintf "%d.%02d", q$Revision: 3.00 $ =~ /(\d+)/g;
+    $VERSION = sprintf "%d.%02d", q$Revision: 3.01 $ =~ /(\d+)/g;
     require XSLoader;
     XSLoader::load( __PACKAGE__, $VERSION );
 }
diff --git a/cpan/Encode/Encode.xs b/cpan/Encode/Encode.xs
index 30fbeaba5f..feeccd8752 100644
--- a/cpan/Encode/Encode.xs
+++ b/cpan/Encode/Encode.xs
@@ -1,5 +1,5 @@
 /*
- $Id: Encode.xs,v 2.46 2019/01/31 04:26:40 dankogai Exp $
+ $Id: Encode.xs,v 2.47 2019/03/13 00:26:18 dankogai Exp dankogai $
  */
 
 #define PERL_NO_GET_CONTEXT
@@ -631,7 +631,7 @@ PREINIT:
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
     modify = (check && !(check & ENCODE_LEAVE_SRC));
 PPCODE:
     if (!SvOK(src))
@@ -688,7 +688,7 @@ PREINIT:
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
     modify = (check && !(check & ENCODE_LEAVE_SRC));
 PPCODE:
     if (!SvOK(src))
@@ -796,7 +796,7 @@ PREINIT:
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
     fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
     modify = (check && !(check & ENCODE_LEAVE_SRC));
     enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
@@ -831,7 +831,7 @@ PREINIT:
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
     fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
     modify = (check && !(check & ENCODE_LEAVE_SRC));
     enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
@@ -862,7 +862,7 @@ PREINIT:
 INIT:
     SvGETMAGIC(src);
     SvGETMAGIC(check_sv);
-    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvIV_nomg(check_sv);
+    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
     fallback_cb = SvROK(check_sv) ? check_sv : &PL_sv_undef;
     modify = (check && !(check & ENCODE_LEAVE_SRC));
     enc = INT2PTR(encode_t *, SvIV(SvRV(obj)));
diff --git a/cpan/Encode/Encode/encode.h b/cpan/Encode/Encode/encode.h
index 8de56ebe21..5d7663d5b5 100644
--- a/cpan/Encode/Encode/encode.h
+++ b/cpan/Encode/Encode/encode.h
@@ -259,13 +259,15 @@ S_new_msg_hv(const char * const message, /* The message text */
 #      define IS_UTF8_2_BYTE_SUPER(s0, s1)       ((s0) == 0xF4 && (s1) >= 0x90)
 #      define IS_UTF8_2_BYTE_SURROGATE(s0, s1)   ((s0) == 0xED && (s1) >= 0xA0)
 #    endif
-#    if defined(UV_IS_QUAD) /* These assume IV_MAX is 2**63-1 */
-#      ifdef EBCDIC     /* Actually is I8 */
-#       define HIGHEST_REPRESENTABLE_UTF8                                       \
-                "\xFF\xA7\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF"
-#      else
-#       define HIGHEST_REPRESENTABLE_UTF8                                       \
-                "\xFF\x80\x87\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF"
+#    ifndef HIGHEST_REPRESENTABLE_UTF8
+#      if defined(UV_IS_QUAD) /* These assume IV_MAX is 2**63-1 */
+#        ifdef EBCDIC     /* Actually is I8 */
+#          define HIGHEST_REPRESENTABLE_UTF8                                    \
+                   "\xFF\xA7\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF"
+#        else
+#          define HIGHEST_REPRESENTABLE_UTF8                                    \
+                   "\xFF\x80\x87\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF"
+#        endif
 #      endif
 #    endif
 #  endif
@@ -371,6 +373,9 @@ S_unexpected_non_continuation_text(const U8 * const s,
                            (int) non_cont_byte_pos);
 }
 
+static int
+S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len);
+
 static int
 S_does_utf8_overflow(const U8 * const s,
                        const U8 * e,

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About