const the variable used for the save stack type in Perl_ss_dup().
authorNicholas Clark <nick@ccl4.org>
Sun, 22 Oct 2006 19:06:14 +0000 (19:06 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 22 Oct 2006 19:06:14 +0000 (19:06 +0000)
p4raw-id: //depot/perl@29079

sv.c

diff --git a/sv.c b/sv.c
index 2a92ba3..b640065 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -10387,6 +10387,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
     long longval;
     GP *gp;
     IV iv;
+    I32 i;
     char *c = NULL;
     void (*dptr) (void*);
     void (*dxptr) (pTHX_ void*);
@@ -10394,9 +10395,9 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
     Newxz(nss, max, ANY);
 
     while (ix > 0) {
-       I32 i = POPINT(ss,ix);
-       TOPINT(nss,ix) = i;
-       switch (i) {
+       const I32 type = POPINT(ss,ix);
+       TOPINT(nss,ix) = type;
+       switch (type) {
        case SAVEt_ITEM:                        /* normal string */
         case SAVEt_SV:                         /* scalar reference */
            sv = (SV*)POPPTR(ss,ix);
@@ -10442,7 +10443,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
        case SAVEt_COP_ARYBASE:                 /* call CopARYBASE_set */
            ptr = POPPTR(ss,ix);
            TOPPTR(nss,ix) = any_dup(ptr, proto_perl);
-           i = POPINT(ss,ix);
+           POPINT(ss,ix);
            TOPINT(nss,ix) = i;
            break;
        case SAVEt_IV:                          /* IV reference */