################################################################################
##
-## $Revision: 19 $
+## $Revision: 20 $
## $Author: mhx $
-## $Date: 2008/01/04 10:47:43 +0100 $
+## $Date: 2008/05/13 21:05:51 +0200 $
##
################################################################################
##
NEED_sv_2pv_flags
NEED_sv_2pv_flags_GLOBAL
+DPPP_SVPV_NOLEN_LP_ARG
=implementation
#endif
+#if { VERSION < 5.8.8 } || ( { VERSION >= 5.9.0 } && { VERSION < 5.9.3 } )
+# define DPPP_SVPV_NOLEN_LP_ARG &PL_na
+#else
+# define DPPP_SVPV_NOLEN_LP_ARG 0
+#endif
+
__UNDEFINED__ SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC)
__UNDEFINED__ SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC)
__UNDEFINED__ SvPV_flags_const_nolen(sv, flags) \
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
? SvPVX_const(sv) : \
- (const char*) sv_2pv_flags(sv, 0, flags|SV_CONST_RETURN))
+ (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
__UNDEFINED__ SvPV_flags_mutable(sv, lp, flags) \
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
__UNDEFINED__ SvPV_force_flags_nolen(sv, flags) \
((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
- ? SvPVX(sv) : sv_pvn_force_flags(sv, 0, flags))
+ ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
__UNDEFINED__ SvPV_force_flags_mutable(sv, lp, flags) \
((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
__UNDEFINED__ SvPV_nolen(sv) \
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
- ? SvPVX(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC))
+ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
__UNDEFINED__ SvPV_nolen_const(sv) \
((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
- ? SvPVX_const(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC|SV_CONST_RETURN))
+ ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
__UNDEFINED__ SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
__UNDEFINED__ SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
RETVAL
-=tests plan => 20
+=tests plan => 39
my $mhx = "mhx";
ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+
require 'testutil.pl' if $@;
}
- if (20) {
+ if (39) {
load();
- plan(tests => 20);
+ plan(tests => 39);
}
}
ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+