diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-04-18 22:31:48 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-04-18 22:31:48 +0000 |
commit | 379d1ffd1cdc48dce48686458f3153f5dd29f323 (patch) | |
tree | e7bc987e092b17ee3bc8b9e62ab9b9702e6b9869 /sv.h | |
parent | 1da4ca5ff65374ad6965719e5eb33e3027a745a7 (diff) | |
download | perl-379d1ffd1cdc48dce48686458f3153f5dd29f323.tar.gz |
PERL_DEBUG_COW for SvUVX and SvPVX
p4raw-id: //depot/perl@24246
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |