From: Nicholas Clark Date: Sun, 22 Oct 2006 19:06:14 +0000 (+0000) Subject: const the variable used for the save stack type in Perl_ss_dup(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b24356f5678a5867e2d91448d2f903c9e5b37540;p=p5sagit%2Fp5-mst-13.2.git const the variable used for the save stack type in Perl_ss_dup(). p4raw-id: //depot/perl@29079 --- diff --git a/sv.c b/sv.c index 2a92ba3..b640065 100644 --- 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 */