diff options
author | Karl Williamson <khw@cpan.org> | 2016-08-26 13:42:53 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-08-31 20:32:35 -0600 |
commit | c5f058dfd0db4297255d7df7a085fdf36232d5b9 (patch) | |
tree | c1077dca54f89961a13c2cf40768e53a46de7457 /ext | |
parent | 8871a094916837597c6a703c2e1b2306314df4fa (diff) | |
download | perl-c5f058dfd0db4297255d7df7a085fdf36232d5b9.tar.gz |
Use new name 'is_utf8_invariant_string' in core
This changes the places in the core to use the clearer synonym added by
the previous commit. It also changes one place that hand-rolled its own
code to use this function instead.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/POSIX/POSIX.xs | 23 | ||||
-rw-r--r-- | ext/POSIX/lib/POSIX.pm | 2 |
2 files changed, 13 insertions, 12 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index bb121c3da7..2af848bd79 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -2121,16 +2121,17 @@ localeconv() (void) hv_store(RETVAL, strings->name, strlen(strings->name), - newSVpvn_utf8(value, - strlen(value), - - /* We mark it as UTF-8 if a utf8 locale - * and is valid and variant under UTF-8 */ - is_utf8_locale - && ! is_invariant_string((U8 *) value, 0) - && is_utf8_string((U8 *) value, 0)), - 0); - } + newSVpvn_utf8( + value, + strlen(value), + + /* We mark it as UTF-8 if a utf8 locale and is + * valid and variant under UTF-8 */ + is_utf8_locale + && ! is_utf8_invariant_string((U8 *) value, 0) + && is_utf8_string((U8 *) value, 0)), + 0); + } strings++; } @@ -3567,7 +3568,7 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) STRLEN len = strlen(buf); sv_usepvn_flags(sv, buf, len, SV_HAS_TRAILING_NUL); if (SvUTF8(fmt) - || (! is_invariant_string((U8*) buf, len) + || (! is_utf8_invariant_string((U8*) buf, len) && is_utf8_string((U8*) buf, len) #ifdef USE_LOCALE_TIME && _is_cur_LC_category_utf8(LC_TIME) diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 9960b2c72c..f11595ebeb 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.71'; +our $VERSION = '1.72'; require XSLoader; |