summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-04-18 20:37:13 +0000
committerNicholas Clark <nick@ccl4.org>2005-04-18 20:37:13 +0000
commitb7e9a5c2d751f7ed3b8a703e57ac933ded5b16ce (patch)
treebcf34825827a23edae1461145bdfdd5ec7dd12f0 /sv.h
parent8b44ba4cc571a1253e8c2108fde4508f22646523 (diff)
downloadperl-b7e9a5c2d751f7ed3b8a703e57ac933ded5b16ce.tar.gz
Replace Renew(SvPVX(...)...) with SvPV_renew, which avoids an LVALUE
SvPVX p4raw-id: //depot/perl@24244
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sv.h b/sv.h
index 07a02969a2..511b547c75 100644
--- a/sv.h
+++ b/sv.h
@@ -793,6 +793,10 @@ in gv.h: */
STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
(SvCUR(sv) = (val) - SvPVX(sv)); } STMT_END
+#define SvPV_renew(sv,n) \
+ (SvPV_set((sv), (MEM_WRAP_CHECK_(n,char) \
+ (char*)saferealloc((Malloc_t)SvPVX(sv),(MEM_SIZE)((n))))))
+
#define BmRARE(sv) ((XPVBM*) SvANY(sv))->xbm_rare
#define BmUSEFUL(sv) ((XPVBM*) SvANY(sv))->xbm_useful
#define BmPREVIOUS(sv) ((XPVBM*) SvANY(sv))->xbm_previous