From: Nicholas Clark Date: Mon, 9 Nov 2009 15:08:53 +0000 (+0000) Subject: In Perl_pad_check_dup(), use sv rather than name for diagnostics. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c541b9b4319bb0bec28d4cc69e3e92bf41bf6e35;p=p5sagit%2Fp5-mst-13.2.git In Perl_pad_check_dup(), use sv rather than name for diagnostics. It already knows its length, and it will be UTF-8 clean in the future. --- diff --git a/pad.c b/pad.c index ae69c9e..becbdc9 100644 --- a/pad.c +++ b/pad.c @@ -568,9 +568,9 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash) if (is_our && (SvPAD_OUR(sv))) break; /* "our" masking "our" */ Perl_warner(aTHX_ packWARN(WARN_MISC), - "\"%s\" variable %s masks earlier declaration in same %s", + "\"%s\" variable %"SVf" masks earlier declaration in same %s", (is_our ? "our" : PL_parser->in_my == KEY_my ? "my" : "state"), - name, + sv, (COP_SEQ_RANGE_HIGH(sv) == PAD_MAX ? "scope" : "statement")); --off; break; @@ -588,7 +588,7 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash) && strEQ(name, SvPVX_const(sv))) { Perl_warner(aTHX_ packWARN(WARN_MISC), - "\"our\" variable %s redeclared", name); + "\"our\" variable %"SVf" redeclared", sv); if ((I32)off <= PL_comppad_name_floor) Perl_warner(aTHX_ packWARN(WARN_MISC), "\t(Did you mean \"local\" instead of \"our\"?)\n");