Update copyrights for files modified in 2006
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index c4cd739..7b12cec 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1,7 +1,7 @@
 /*    pp_hot.c
  *
  *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -608,7 +608,7 @@ PP(pp_add)
 PP(pp_aelemfast)
 {
     dSP;
-    AV *av = PL_op->op_flags & OPf_SPECIAL ?
+    AV * const av = PL_op->op_flags & OPf_SPECIAL ?
                (AV*)PAD_SV(PL_op->op_targ) : GvAV(cGVOP_gv);
     const U32 lval = PL_op->op_flags & OPf_MOD;
     SV** const svp = av_fetch(av, PL_op->op_private, lval);
@@ -1036,7 +1036,7 @@ PP(pp_aassign)
     I32 i;
     int magic;
     int duplicates = 0;
-    SV **firsthashrelem = 0;   /* "= 0" keeps gcc 2.95 quiet  */
+    SV **firsthashrelem = NULL;        /* "= 0" keeps gcc 2.95 quiet  */
 
 
     PL_delaymagic = DM_DELAY;          /* catch simultaneous items */
@@ -1311,7 +1311,7 @@ PP(pp_match)
     if ((global = dynpm->op_pmflags & PMf_GLOBAL)) {
        rx->startp[0] = -1;
        if (SvTYPE(TARG) >= SVt_PVMG && SvMAGIC(TARG)) {
-           MAGIC* mg = mg_find(TARG, PERL_MAGIC_regex_global);
+           MAGIC* const mg = mg_find(TARG, PERL_MAGIC_regex_global);
            if (mg && mg->mg_len >= 0) {
                if (!(rx->reganch & ROPT_GPOS_SEEN))
                    rx->endp[0] = rx->startp[0] = mg->mg_len;
@@ -1419,9 +1419,11 @@ play_it_again:
     }
     else {
        if (global) {
-           MAGIC* mg = 0;
+           MAGIC* mg;
            if (SvTYPE(TARG) >= SVt_PVMG && SvMAGIC(TARG))
                mg = mg_find(TARG, PERL_MAGIC_regex_global);
+           else
+               mg = NULL;
            if (!mg) {
                sv_magic(TARG, (SV*)0, PERL_MAGIC_regex_global, Nullch, 0);
                mg = mg_find(TARG, PERL_MAGIC_regex_global);
@@ -1685,7 +1687,7 @@ Perl_do_readline(pTHX)
                continue;
            }
        } else if (SvUTF8(sv)) { /* OP_READLINE, OP_RCATLINE */
-            const U8 *s = (const U8*)SvPVX_const(sv) + offset;
+            const U8 * const s = (const U8*)SvPVX_const(sv) + offset;
             const STRLEN len = SvCUR(sv) - offset;
             const U8 *f;
             
@@ -1739,8 +1741,8 @@ PP(pp_helem)
     dSP;
     HE* he;
     SV **svp;
-    SV *keysv = POPs;
-    HV *hv = (HV*)POPs;
+    SV * const keysv = POPs;
+    HV * const hv = (HV*)POPs;
     const U32 lval = PL_op->op_flags & OPf_MOD || LVRET;
     const U32 defer = PL_op->op_private & OPpLVAL_DEFER;
     SV *sv;
@@ -1947,7 +1949,7 @@ PP(pp_iter)
            RETPUSHNO;
 
        if (SvMAGICAL(av) || AvREIFY(av)) {
-           SV ** const svp = av_fetch(av, --cx->blk_loop.iterix, FALSE);
+           SV * const * const svp = av_fetch(av, --cx->blk_loop.iterix, FALSE);
            sv = svp ? *svp : Nullsv;
        }
        else {
@@ -1960,7 +1962,7 @@ PP(pp_iter)
            RETPUSHNO;
 
        if (SvMAGICAL(av) || AvREIFY(av)) {
-           SV ** const svp = av_fetch(av, ++cx->blk_loop.iterix, FALSE);
+           SV * const * const svp = av_fetch(av, ++cx->blk_loop.iterix, FALSE);
            sv = svp ? *svp : Nullsv;
        }
        else {