This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Add functions for Turkic locale case changing
[perl5.git] / pad.c
diff --git a/pad.c b/pad.c
index 9c20d66..f73fc55 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -66,7 +66,7 @@ or resolved at compile time.  These don't have names by which they
 can be looked up from Perl code at run time through eval"" the way
 C<my>/C<our> variables can be.  Since they can't be looked up by "name"
 but only by their index allocated at compile time (which is usually
-in C<PL_op->op_targ>), wasting a name SV for them doesn't make sense.
+in C<< PL_op->op_targ >>), wasting a name SV for them doesn't make sense.
 
 The pad names in the PADNAMELIST have their PV holding the name of
 the variable.  The C<COP_SEQ_RANGE_LOW> and C<_HIGH> fields form a range
@@ -137,7 +137,7 @@ values for the pad for the currently-executing code.
 =for apidoc AmxU|SV **|PL_curpad
 
 Points directly to the body of the L</PL_comppad> array.
-(I.e., this is C<PAD_ARRAY(PL_comppad)>.)
+(I.e., this is C<PadARRAY(PL_comppad)>.)
 
 =cut
 */
@@ -395,9 +395,11 @@ Perl_cv_undef_flags(pTHX_ CV *cv, U32 flags)
                if (name && PadnamePV(name) && *PadnamePV(name) == '&')
                    {
                        CV * const innercv = MUTABLE_CV(curpad[ix]);
-                       U32 inner_rc = SvREFCNT(innercv);
-                       assert(inner_rc);
+                       U32 inner_rc;
+                       assert(innercv);
                        assert(SvTYPE(innercv) != SVt_PVFM);
+                       inner_rc = SvREFCNT(innercv);
+                       assert(inner_rc);
 
                        if (SvREFCNT(comppad) < 2) { /* allow for /(?{ sub{} })/  */
                            curpad[ix] = NULL;
@@ -857,7 +859,7 @@ S_pad_check_dup(pTHX_ PADNAME *name, U32 flags, const HV *ourstash)
 
     assert((flags & ~padadd_OUR) == 0);
 
-    if (PadnamelistMAX(PL_comppad_name) < 0 || !ckWARN(WARN_MISC))
+    if (PadnamelistMAX(PL_comppad_name) < 0 || !ckWARN(WARN_SHADOW))
        return; /* nothing to check */
 
     svp = PadnamelistARRAY(PL_comppad_name);
@@ -875,7 +877,7 @@ S_pad_check_dup(pTHX_ PADNAME *name, U32 flags, const HV *ourstash)
            if (is_our && (SvPAD_OUR(sv)))
                break; /* "our" masking "our" */
            /* diag_listed_as: "%s" variable %s masks earlier declaration in same %s */
-           Perl_warner(aTHX_ packWARN(WARN_MISC),
+           Perl_warner(aTHX_ packWARN(WARN_SHADOW),
                "\"%s\" %s %" PNf " masks earlier declaration in same %s",
                (   is_our                         ? "our"   :
                     PL_parser->in_my == KEY_my     ? "my"    :
@@ -901,10 +903,10 @@ S_pad_check_dup(pTHX_ PADNAME *name, U32 flags, const HV *ourstash)
                && SvOURSTASH(sv) == ourstash
                && memEQ(PadnamePV(sv), PadnamePV(name), PadnameLEN(name)))
            {
-               Perl_warner(aTHX_ packWARN(WARN_MISC),
+               Perl_warner(aTHX_ packWARN(WARN_SHADOW),
                    "\"our\" variable %" PNf " redeclared", PNfARG(sv));
                if (off <= PL_comppad_name_floor)
-                   Perl_warner(aTHX_ packWARN(WARN_MISC),
+                   Perl_warner(aTHX_ packWARN(WARN_SHADOW),
                        "\t(Did you mean \"local\" instead of \"our\"?)\n");
                break;
            }