pp.c, pp_sys.c: Use DO_UTF8 instead of its expansion
authorKarl Williamson <khw@cpan.org>
Tue, 19 Mar 2019 03:17:03 +0000 (21:17 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 19 Mar 2019 16:20:28 +0000 (10:20 -0600)
We have a macro to hide the details of this; use it

pp.c
pp_sys.c

diff --git a/pp.c b/pp.c
index c7fa231..42b111e 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -4012,7 +4012,7 @@ PP(pp_ucfirst)
 
        /* In a "use bytes" we don't treat the source as UTF-8, but, still want
         * the destination to retain that flag */
-       if (SvUTF8(source) && ! IN_BYTES)
+       if (DO_UTF8(source))
            SvUTF8_on(dest);
 
        if (!inplace) { /* Finish the rest of the string, unchanged */
index e28e890..304e1b5 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1736,7 +1736,7 @@ PP(pp_sysread)
     }
     else {
        buffer = SvPV_force(bufsv, blen);
-       buffer_utf8 = !IN_BYTES && SvUTF8(bufsv);
+       buffer_utf8 = DO_UTF8(bufsv);
     }
     if (DO_UTF8(bufsv)) {
        blen = sv_len_utf8_nomg(bufsv);