From c541b9b4319bb0bec28d4cc69e3e92bf41bf6e35 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 9 Nov 2009 15:08:53 +0000 Subject: 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. --- pad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pad.c') diff --git a/pad.c b/pad.c index ae69c9e019..becbdc91dd 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"); -- cgit v1.2.1