From: Artur Bergman Date: Sun, 29 Feb 2004 22:04:53 +0000 (+0000) Subject: simplify sv.h X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=781fdd31c45ee21aa9675df3050b620715e9208d;p=p5sagit%2Fp5-mst-13.2.git simplify sv.h Message-Id: <4D3C272C-6B03-11D8-B799-000A95A2734C@nanisky.com> p4raw-id: //depot/perl@22428 --- diff --git a/sv.h b/sv.h index 1dbf6ea..ff7c9db 100644 --- a/sv.h +++ b/sv.h @@ -749,22 +749,22 @@ and leaves the UTF-8 status as it was. (void) SvIV(sv); } STMT_END #define SvIV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ - (((XPVIV*) SvANY(sv))->xiv_iv = val); } STMT_END + (SvIVX(sv) = (val)); } STMT_END #define SvNV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) == SVt_NV || SvTYPE(sv) >= SVt_PVNV); \ - (((XPVNV*) SvANY(sv))->xnv_nv = val); } STMT_END + (SvNVX(sv) = (val)); } STMT_END #define SvPV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_pv = val); } STMT_END + (SvPVX(sv) = (val)); } STMT_END #define SvCUR_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_cur = val); } STMT_END + (SvCUR(sv) = (val)); } STMT_END #define SvLEN_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_len = val); } STMT_END + (SvLEN(sv) = (val)); } STMT_END #define SvEND_set(sv, val) \ STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_cur = val - SvPVX(sv)); } STMT_END + (SvCUR(sv) = (val) - SvPVX(sv)); } STMT_END #define BmRARE(sv) ((XPVBM*) SvANY(sv))->xbm_rare #define BmUSEFUL(sv) ((XPVBM*) SvANY(sv))->xbm_useful