undo problematic change#1367
Gurusamy Sarathy [Thu, 9 Jul 1998 11:07:42 +0000 (11:07 +0000)]
p4raw-link: @1367 on //depot/perl: d426b052dee31c20224ef2893d5c969ad5a2c617

p4raw-id: //depot/perl@1398

pp_ctl.c
pp_hot.c

index 3002412..9cf422f 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1388,7 +1388,6 @@ PP(pp_enteriter)
                     croak("Range iterator outside integer range");
                 cx->blk_loop.iterix = SvIV(sv);
                 cx->blk_loop.itermax = SvIV((SV*)cx->blk_loop.iterary);
-                sv_setiv(*svp, 0); /* make sure index SV is IV capable */
            }
            else
                cx->blk_loop.iterlval = newSVsv(sv);
index dc8935b..9de5ece 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1459,14 +1459,7 @@ PP(pp_iter)
        /* integer increment */
        if (cx->blk_loop.iterix > cx->blk_loop.itermax)
            RETPUSHNO;
-
-       /* we know that the loop index SV is IV capable, so we can save
-        * some time by doing the essential work of sv_setiv() ourself.
-        */
-       sv = *cx->blk_loop.itervar;
-       (void)SvIOK_only(sv);
-       SvIVX(sv) = cx->blk_loop.iterix++;
-
+       sv_setiv(*cx->blk_loop.itervar, cx->blk_loop.iterix++);
        RETPUSHYES;
     }