diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-07 18:33:08 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-07 18:33:08 +0000 |
commit | 9ce348e89750366600d8292ab1f0f55948ddb66e (patch) | |
tree | d59af08d4d9a034146fcaa47f80b67dcf32f8eb7 | |
parent | fa28a6c6f7e8f9e40914ce7c0e4bd1cf2100f380 (diff) | |
download | perl-9ce348e89750366600d8292ab1f0f55948ddb66e.tar.gz |
Add SvPV_nolen_const and SvPV_nomg_const
p4raw-id: //depot/perl@24739
-rw-r--r-- | sv.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1224,7 +1224,12 @@ Like C<sv_catsv> but doesn't process magic. ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC)) +#define SvPV_nolen_const(sv) \ + ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ + ? SvPVX_const(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC|SV_CONST_RETURN)) + #define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0) +#define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0) /* ----*/ @@ -1273,6 +1278,7 @@ Like C<sv_catsv> but doesn't process magic. # define SvNVx(sv) ({SV *_sv = (SV*)(sv); SvNV(_sv); }) # define SvPVx(sv, lp) ({SV *_sv = (sv); SvPV(_sv, lp); }) # define SvPVx_const(sv, lp) ({SV *_sv = (sv); SvPV_const(_sv, lp); }) +# define SvPVx_nolen_const(sv) ({SV *_sv = (sv); SvPV_nolen_const(_sv); }) # define SvPVutf8x(sv, lp) ({SV *_sv = (sv); SvPVutf8(_sv, lp); }) # define SvPVbytex(sv, lp) ({SV *_sv = (sv); SvPVbyte(_sv, lp); }) # define SvTRUE(sv) ( \ |