X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.h;h=01865360d24ac436f2a8d207ca963181d25b4303;hb=8ebc5c0145d2e3559bce3073437e6d027dcdffcc;hp=36fa72d74997b91454c95245fcbf29a8bbe1e55f;hpb=5f05dabc4054964aa3b10f44f8468547f051cdf8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.h b/sv.h index 36fa72d..0186536 100644 --- a/sv.h +++ b/sv.h @@ -131,11 +131,6 @@ struct io { #define SVphv_SHAREKEYS 0x20000000 /* keys live on shared string table */ #define SVphv_LAZYDEL 0x40000000 /* entry in xhv_eiter must be deleted */ -#ifdef OVERLOAD -#define SVpgv_AM 0x40000000 -/* #define SVpgv_badAM 0x20000000 */ -#endif /* OVERLOAD */ - struct xrv { SV * xrv_rv; /* pointer to another SV */ }; @@ -558,7 +553,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)