This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [Fwd: Scoping of %^H still broken in both perl@8269 and perl-5.6.1-TRIAL1]
[perl5.git] / hv.c
diff --git a/hv.c b/hv.c
index 304be2b..0e50523 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1101,7 +1101,7 @@ Perl_newHVhv(pTHX_ HV *ohv)
        hv_iterinit(ohv);
        while ((entry = hv_iternext(ohv))) {
            hv_store(hv, HeKEY(entry), HeKLEN_UTF8(entry),
-                    SvREFCNT_inc(HeVAL(entry)), HeHASH(entry));
+                    newSVsv(HeVAL(entry)), HeHASH(entry));
        }
        HvRITER(ohv) = hv_riter;
        HvEITER(ohv) = hv_eiter;