This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorAndy Lester <andy@petdance.com>
Thu, 29 Dec 2005 01:15:09 +0000 (19:15 -0600)
committerNicholas Clark <nick@ccl4.org>
Sat, 13 Jan 2007 18:59:04 +0000 (18:59 +0000)
[ 26527]
Subject: [PATCH] Actual real consting of parms
Message-ID: <20051229071509.GA32653@petdance.com>
p4raw-link: @26527 on //depot/perl: eb86f8b30b3c669d547a1d9008e5860ab483ae2d

p4raw-id: //depot/maint-5.8/perl@29793
p4raw-edited: from //depot/perl@26527 'edit in' sv.c (@26526..)
p4raw-integrated: from //depot/perl@26527 'ignore' proto.h (@26526..)

sv.c

diff --git a/sv.c b/sv.c
index b3ad21f..24d6ac3 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9128,12 +9128,11 @@ Perl_sv_dup(pTHX_ SV *sstr, CLONE_PARAMS* param)
     if(param->flags & CLONEf_JOIN_IN) {
         /** We are joining here so we don't want do clone
            something that is bad **/
-       const char *hvname;
-
-        if(SvTYPE(sstr) == SVt_PVHV &&
-          (hvname = HvNAME_get(sstr))) {
-           /** don't clone stashes if they already exist **/
-           return (SV*)gv_stashpv(hvname,0);
+       if (SvTYPE(sstr) == SVt_PVHV) {
+           const char * const hvname = HvNAME_get(sstr);
+           if (hvname)
+               /** don't clone stashes if they already exist **/
+               return (SV*)gv_stashpv(hvname,0);
         }
     }