Missed three sv_2mortal(newSVpvn(...))s in the headers.
authorNicholas Clark <nick@ccl4.org>
Thu, 3 Jan 2008 17:54:38 +0000 (17:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 3 Jan 2008 17:54:38 +0000 (17:54 +0000)
p4raw-id: //depot/perl@32820

XSUB.h
hv.h
sv.h

diff --git a/XSUB.h b/XSUB.h
index a149115..a049e88 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -269,7 +269,7 @@ Rethrows a previously caught exception.  See L<perlguts/"Exception Handling">.
 #define XST_mUV(i,v)  (ST(i) = sv_2mortal(newSVuv(v))  )
 #define XST_mNV(i,v)  (ST(i) = sv_2mortal(newSVnv(v))  )
 #define XST_mPV(i,v)  (ST(i) = sv_2mortal(newSVpv(v,0)))
-#define XST_mPVN(i,v,n)  (ST(i) = sv_2mortal(newSVpvn(v,n)))
+#define XST_mPVN(i,v,n)  (ST(i) = newSVpvn_flags(v,n, SVs_TEMP))
 #define XST_mNO(i)    (ST(i) = &PL_sv_no   )
 #define XST_mYES(i)   (ST(i) = &PL_sv_yes  )
 #define XST_mUNDEF(i) (ST(i) = &PL_sv_undef)
diff --git a/hv.h b/hv.h
index 3be32e6..5f3d0a1 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -327,8 +327,8 @@ C<SV*>.
 #define HeSVKEY_force(he)      (HeKEY(he) ?                            \
                                 ((HeKLEN(he) == HEf_SVKEY) ?           \
                                  HeKEY_sv(he) :                        \
-                                 sv_2mortal(newSVpvn(HeKEY(he),        \
-                                                    HeKLEN(he)))) :    \
+                                 newSVpvn_flags(HeKEY(he),             \
+                                                HeKLEN(he), SVs_TEMP)) : \
                                 &PL_sv_undef)
 #define HeSVKEY_set(he,sv)     ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv))
 
diff --git a/sv.h b/sv.h
index 9d0851c..960a059 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1761,7 +1761,7 @@ Like C<sv_catsv> but doesn't process magic.
 #define sv_catpvn_utf8_upgrade(dsv, sstr, slen, nsv)   \
        STMT_START {                                    \
            if (!(nsv))                                 \
-               nsv = sv_2mortal(newSVpvn(sstr, slen)); \
+               nsv = newSVpvn_flags(sstr, slen, SVs_TEMP);     \
            else                                        \
                sv_setpvn(nsv, sstr, slen);             \
            SvUTF8_off(nsv);                            \