This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Better document setlocale, "use locale" interactions
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index 86d34b1..8449047 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1028,7 +1028,7 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
                Perl_croak(aTHX_
                           "Can't locate object method \"%"UTF8f
                           "\" via package \"%"HEKf"\"",
-                                   is_utf8, nend - name, name,
+                                   UTF8fARG(is_utf8, nend - name, name),
                                     HEKfARG(HvNAME_HEK(stash)));
            }
            else {
@@ -1045,7 +1045,7 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
                           "Can't locate object method \"%"UTF8f
                           "\" via package \"%"SVf"\""
                           " (perhaps you forgot to load \"%"SVf"\"?)",
-                          is_utf8, nend - name, name,
+                          UTF8fARG(is_utf8, nend - name, name),
                            SVfARG(packnamesv), SVfARG(packnamesv));
            }
        }
@@ -1140,7 +1140,7 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags)
                         "Use of inherited AUTOLOAD for non-method %"SVf
                         "::%"UTF8f"() is deprecated",
                         SVfARG(packname),
-                         is_utf8, len, name);
+                         UTF8fARG(is_utf8, len, name));
 
     if (CvISXSUB(cv)) {
         /* Instead of forcing the XSUB do another lookup for $AUTOLOAD
@@ -1575,12 +1575,12 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
                            "Variable \"%c%"UTF8f"\" is not imported",
                            sv_type == SVt_PVAV ? '@' :
                            sv_type == SVt_PVHV ? '%' : '$',
-                           is_utf8, len, name);
+                           UTF8fARG(is_utf8, len, name));
                        if (GvCVu(*gvp))
                            Perl_ck_warner_d(
                                aTHX_ packWARN(WARN_MISC),
                                "\t(Did you mean &%"UTF8f" instead?)\n",
-                               is_utf8, len, name
+                               UTF8fARG(is_utf8, len, name)
                            );
                        stash = NULL;
                    }
@@ -1603,7 +1603,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
                 (sv_type == SVt_PV ? "$"
                  : sv_type == SVt_PVAV ? "@"
                  : sv_type == SVt_PVHV ? "%"
-                 : ""), is_utf8, len, name);
+                 : ""), UTF8fARG(is_utf8, len, name));
            GV *gv;
            if (is_utf8)
                SvUTF8_on(err);
@@ -1701,7 +1701,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
     if (add & GV_ADDWARN)
        Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL),
                "Had to create %"UTF8f" unexpectedly",
-                is_utf8, name_end-nambeg, nambeg);
+                UTF8fARG(is_utf8, name_end-nambeg, nambeg));
     gv_init_pvn(gv, stash, name, len, (add & GV_ADDMULTI)|is_utf8);
 
     if ( isIDFIRST_lazy_if(name, is_utf8)
@@ -2127,7 +2127,7 @@ Perl_newGVgen_flags(pTHX_ const char *pack, U32 flags)
     assert(!(flags & ~SVf_UTF8));
 
     return gv_fetchpv(Perl_form(aTHX_ "%"UTF8f"::_GEN_%ld",
-                                    flags, strlen(pack), pack,
+                                UTF8fARG(flags, strlen(pack), pack),
                                 (long)PL_gensym++),
                       GV_ADD, SVt_PVGV);
 }