This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
POSIX.xs: Convert to use is_utf8_non_invariant_string()
authorKarl Williamson <khw@cpan.org>
Sat, 18 Nov 2017 21:21:49 +0000 (14:21 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 26 Nov 2017 17:35:53 +0000 (10:35 -0700)
In localeconv()

ext/POSIX/POSIX.xs
ext/POSIX/lib/POSIX.pm

index cf27c12..922f4d1 100644 (file)
@@ -3565,11 +3565,11 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
             GCC_DIAG_RESTORE;
             sv = sv_newmortal();
            if (buf) {
+                const U8 * first_variant;
                 STRLEN len = strlen(buf);
                sv_usepvn_flags(sv, buf, len, SV_HAS_TRAILING_NUL);
-               if (SvUTF8(fmt)
-                    || (! is_utf8_invariant_string((U8*) buf, len)
-                        && is_utf8_string((U8*) buf, len)
+               if (       SvUTF8(fmt)
+                    || (   is_utf8_non_invariant_string((U8*) buf, len)
 #ifdef USE_LOCALE_TIME
                         && _is_cur_LC_category_utf8(LC_TIME)
 #endif
index ff61981..1270fc9 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 
 our ($AUTOLOAD, %SIGRT);
 
-our $VERSION = '1.80';
+our $VERSION = '1.81';
 
 require XSLoader;