summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sv.h b/sv.h
index 2dab650a5c..129111b537 100644
--- a/sv.h
+++ b/sv.h
@@ -2298,15 +2298,23 @@ properly null terminated. Equivalent to sv_setpvs(""), but more efficient.
#define SvSetSV_and(dst,src,finally) \
STMT_START { \
- if (LIKELY((dst) != (src))) { \
- sv_setsv(dst, src); \
+ SV * src_ = src; \
+ SV * dst_ = dst; \
+ if (LIKELY((dst_) != (src_))) { \
+ sv_setsv(dst_, src_); \
finally; \
} \
} STMT_END
+
#define SvSetSV_nosteal_and(dst,src,finally) \
STMT_START { \
- if (LIKELY((dst) != (src))) { \
- sv_setsv_flags(dst, src, SV_GMAGIC | SV_NOSTEAL | SV_DO_COW_SVSETSV); \
+ SV * src_ = src; \
+ SV * dst_ = dst; \
+ if (LIKELY((dst_) != (src_))) { \
+ sv_setsv_flags(dst_, src_, \
+ SV_GMAGIC \
+ | SV_NOSTEAL \
+ | SV_DO_COW_SVSETSV); \
finally; \
} \
} STMT_END