In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/dd0f8ff2d050f302c0dd99da2626c4cef41ec422?hp=2814f4b3549f665a6f9203ac9e890ae1e415e0dc>

- Log -----------------------------------------------------------------
commit dd0f8ff2d050f302c0dd99da2626c4cef41ec422
Author: Karl Williamson <[email protected]>
Date:   Wed Oct 5 14:56:59 2016 -0600

    XS-APItest/t/utf8.t: Fix failing EBCDIC test
    
    Recent commit 418080dc73a4b9e525a76d6d3b5034ff616716b4 fixing a test in
    this file that was failing only on EBCDIC platforms had an error.  It
    applied a correction to a test that didn't require it, causing it to
    fail.  This commit changes that to use a different method to detect
    which tests to apply the correction to, and knowing that some things can
    be determined earlier as a result.

M       ext/XS-APItest/t/utf8.t

commit b343c774df716a0537fdf87fbe79ef3302950ba2
Author: Karl Williamson <[email protected]>
Date:   Wed Oct 5 13:45:00 2016 -0600

    utf8.c: Add missing cast
    
    This string literal contains U8's.  It normally is only compiled on
    EBCDIC, and when I tried it (by changing the #ifdef's around) on Linux
    g++, it fails to compile.  Apparently it does compile on z/OS, but the
    logs don't show the result.  But there are a bunch of failures there
    involving this function, and this could explain them.

M       utf8.c
-----------------------------------------------------------------------

Summary of changes:
 ext/XS-APItest/t/utf8.t | 6 +++++-
 utf8.c                  | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ext/XS-APItest/t/utf8.t b/ext/XS-APItest/t/utf8.t
index 2061232..32f60e0 100644
--- a/ext/XS-APItest/t/utf8.t
+++ b/ext/XS-APItest/t/utf8.t
@@ -1818,7 +1818,11 @@ foreach my $test (@tests) {
                             $comment .= ", but need 2 bytes to discern";
                         }
                     }
-                    elsif ($testname =~ /first non_unicode/ && $j < 2) {
+                    elsif (   ($disallow_flags & $UTF8_DISALLOW_SUPER)
+                           && $j < 2
+                           && ord(native_to_I8(substr($bytes, 0, 1)))
+                               lt ((isASCII) ? 0xF5 : 0xFA))
+                    {
                         $ret_should_be = 1;
                         $comment .= ", but need 2 bytes to discern";
                     }
diff --git a/utf8.c b/utf8.c
index ec550c3..02f7716 100644
--- a/utf8.c
+++ b/utf8.c
@@ -382,8 +382,8 @@ S_is_utf8_cp_above_31_bits(const U8 * const s, const U8 * 
const e)
 
 #ifdef EBCDIC
 
-        /* [0] is start byte    [1] [2] [3] [4] [5] [6] [7] */
-    const U8 * const prefix = "\x41\x41\x41\x41\x41\x41\x42";
+        /* [0] is start byte           [1] [2] [3] [4] [5] [6] [7] */
+    const U8 * const prefix = (U8 *) "\x41\x41\x41\x41\x41\x41\x42";
     const STRLEN prefix_len = sizeof(prefix) - 1;
     const STRLEN len = e - s;
     const STRLEN cmp_len = MIN(prefix_len, len - 1);

--
Perl5 Master Repository

Reply via email to