the SV if the SV does not contain a string. The SV may cache the
stringified form becoming C<SvPOK>. Handles 'get' magic.
+=for apidoc Am|char*|SvPV_nomg_nolen|SV* sv
+Like C<SvPV_nolen> but doesn't process magic.
+
=for apidoc Am|IV|SvIV|SV* sv
Coerces the given SV to an integer and returns it. See C<SvIVx> for a
version which guarantees to evaluate sv only once.
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
? SvPVX(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC))
+#define SvPV_nomg_nolen(sv) \
+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
+ ? SvPVX(sv) : sv_2pv_flags(sv, 0, 0))
+
#define SvPV_nolen_const(sv) \
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
? SvPVX_const(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC|SV_CONST_RETURN))
SvSetSV_nosteal_and(dst,src,/*nothing*/;)
#define SvSetMagicSV(dst,src) \
- SvSetSV_and(dst,src, \
- if (SvSMAGICAL(dst) \
- && ( \
- !isGV_with_GP(dst) || !SvROK(src) || isGV_with_GP(SvRV(src)) \
- ) \
- ) \
- mg_set(dst) \
- )
+ SvSetSV_and(dst,src,SvSETMAGIC(dst))
#define SvSetMagicSV_nosteal(dst,src) \
- SvSetSV_nosteal_and(dst,src, \
- if (SvSMAGICAL(dst) \
- && ( \
- !isGV_with_GP(dst) || !SvROK(src) || isGV_with_GP(SvRV(src)) \
- ) \
- ) \
- mg_set(dst) \
- )
+ SvSetSV_nosteal_and(dst,src,SvSETMAGIC(dst))
#if !defined(SKIP_DEBUGGING)