summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-04-18 22:31:48 +0000
committerNicholas Clark <nick@ccl4.org>2005-04-18 22:31:48 +0000
commit379d1ffd1cdc48dce48686458f3153f5dd29f323 (patch)
treee7bc987e092b17ee3bc8b9e62ab9b9702e6b9869 /sv.h
parent1da4ca5ff65374ad6965719e5eb33e3027a745a7 (diff)
downloadperl-379d1ffd1cdc48dce48686458f3153f5dd29f323.tar.gz
PERL_DEBUG_COW for SvUVX and SvPVX
p4raw-id: //depot/perl@24246
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sv.h b/sv.h
index b90d209c5f..251a1d9751 100644
--- a/sv.h
+++ b/sv.h
@@ -738,14 +738,15 @@ in gv.h: */
#ifdef PERL_DEBUG_COW
#define SvIVX(sv) (0 + ((XPVIV*) SvANY(sv))->xiv_iv)
-#define SvUVX(sv) ((XPVUV*) SvANY(sv))->xuv_uv
+#define SvUVX(sv) (0 + (XPVUV*) SvANY(sv))->xuv_uv
#define SvNVX(sv) (0.0 + ((XPVNV*)SvANY(sv))->xnv_nv)
+#define SvPVX(sv) (0 + ((XPV*) SvANY(sv))->xpv_pv)
#else
#define SvIVX(sv) ((XPVIV*) SvANY(sv))->xiv_iv
#define SvUVX(sv) ((XPVUV*) SvANY(sv))->xuv_uv
#define SvNVX(sv) ((XPVNV*)SvANY(sv))->xnv_nv
+#define SvPVX(sv) ((XPV*) SvANY(sv))->xpv_pv
#endif
-#define SvPVX(sv) ((XPV*) SvANY(sv))->xpv_pv
#define SvCUR(sv) ((XPV*) SvANY(sv))->xpv_cur
#define SvLEN(sv) ((XPV*) SvANY(sv))->xpv_len
#define SvEND(sv)(((XPV*) SvANY(sv))->xpv_pv + ((XPV*)SvANY(sv))->xpv_cur)
@@ -779,7 +780,7 @@ in gv.h: */
(((XPVNV*)SvANY(sv))->xnv_nv = (val)); } STMT_END
#define SvPV_set(sv, val) \
STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
- (SvPVX(sv) = (val)); } STMT_END
+ (((XPV*) SvANY(sv))->xpv_pv = (val)); } STMT_END
#define SvUV_set(sv, val) \
STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
(((XPVUV*)SvANY(sv))->xuv_uv = (val)); } STMT_END