[shell changes from patch from perl5.003_23 to perl5.003_24]
[p5sagit/p5-mst-13.2.git] / sv.h
diff --git a/sv.h b/sv.h
index 29342f0..0322965 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -218,6 +218,8 @@ struct xpvbm {
     U8         xbm_rare;       /* rarest character in string */
 };
 
+/* This structure much match XPVCV */
+
 struct xpvfm {
     char *     xpv_pv;         /* pointer to malloced string */
     STRLEN     xpv_cur;        /* length of xpv_pv as a C string */
@@ -237,6 +239,8 @@ struct xpvfm {
     long       xcv_depth;              /* >= 2 indicates recursive call */
     AV *       xcv_padlist;
     CV *       xcv_outside;
+    U8         xcv_flags;
+
     I32                xfm_lines;
 };
 
@@ -553,7 +557,15 @@ SV *newRV_noinc _((SV *));
 
 #define SvSETMAGIC(x) if (SvSMAGICAL(x)) mg_set(x)
 
-#define SvSetSV(dst,src) if (dst != src) sv_setsv(dst,src)
+#define SvSetSV(dst,src) if ((dst) != (src)) sv_setsv(dst,src)
+
+#define SvSetSV_nosteal(dst,src) \
+           if ((dst) != (src)) {                       \
+               U32 tMpF = SvFLAGS(src) & SVs_TEMP;     \
+               SvTEMP_off(src);                        \
+               sv_setsv(dst, src);                     \
+               SvFLAGS(src) |= tMpF;                   \
+           }
 
 #define SvPEEK(sv) sv_peek(sv)