diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-03-17 09:52:33 +0000 |
---|---|---|
committer | Charles Bailey <bailey@genetics.upenn.edu> | 1996-03-17 09:52:33 +0000 |
commit | 80b92232e4d4ad8078e12cd15b5399299c7f9f9b (patch) | |
tree | 7c3c44f30abee3c4ade7382f1c72e01d956bf0f7 /sv.h | |
parent | 2114d1da37086653400412ce519eff150c42d85a (diff) | |
download | perl-80b92232e4d4ad8078e12cd15b5399299c7f9f9b.tar.gz |
Incorporate single-statement macros
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -424,23 +424,23 @@ struct xpvio { #define SvSTASH(sv) ((XPVMG*) SvANY(sv))->xmg_stash #define SvIV_set(sv, val) \ - do { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ - (((XPVIV*) SvANY(sv))->xiv_iv = val); } while (0) + STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ + (((XPVIV*) SvANY(sv))->xiv_iv = val); } STMT_END #define SvNV_set(sv, val) \ - do { assert(SvTYPE(sv) == SVt_NV || SvTYPE(sv) >= SVt_PVNV); \ - (((XPVNV*) SvANY(sv))->xnv_nv = val); } while (0) + STMT_START { assert(SvTYPE(sv) == SVt_NV || SvTYPE(sv) >= SVt_PVNV); \ + (((XPVNV*) SvANY(sv))->xnv_nv = val); } STMT_END #define SvPV_set(sv, val) \ - do { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_pv = val); } while (0) + STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ + (((XPV*) SvANY(sv))->xpv_pv = val); } STMT_END #define SvCUR_set(sv, val) \ - do { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_cur = val); } while (0) + STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ + (((XPV*) SvANY(sv))->xpv_cur = val); } STMT_END #define SvLEN_set(sv, val) \ - do { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_len = val); } while (0) + STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ + (((XPV*) SvANY(sv))->xpv_len = val); } STMT_END #define SvEND_set(sv, val) \ - do { assert(SvTYPE(sv) >= SVt_PV); \ - (((XPV*) SvANY(sv))->xpv_cur = val - SvPVX(sv)); } while (0) + STMT_START { assert(SvTYPE(sv) >= SVt_PV); \ + (((XPV*) SvANY(sv))->xpv_cur = val - SvPVX(sv)); } STMT_END #define BmRARE(sv) ((XPVBM*) SvANY(sv))->xbm_rare #define BmUSEFUL(sv) ((XPVBM*) SvANY(sv))->xbm_useful |