diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-11-09 15:08:53 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-11-09 15:11:56 +0000 |
commit | c541b9b4319bb0bec28d4cc69e3e92bf41bf6e35 (patch) | |
tree | 1018e50e95b433a4012072a822fd6863bc85bf39 /pad.c | |
parent | d2ab4a7b0a87b2386836ad59b9ff1c91bf2d3247 (diff) | |
download | perl-c541b9b4319bb0bec28d4cc69e3e92bf41bf6e35.tar.gz |
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.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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"); |