This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_sv_usepvn_flags(), with MYMALLOC, use the actual malloc()ed
[perl5.git] / XSUB.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)