PUSHMARK(SP);
XPUSHs(sv);
- XPUSHs(sv_2mortal(newSVpv(name, 0)));
+ mXPUSHs(newSVpv(name, 0));
PUTBACK;
- methodname = sv_2mortal(newSVpvs("isa"));
+ methodname = newSVpvs_flags("isa", SVs_TEMP);
/* ugly hack: use the SvSCREAM flag so S_method_common
* can figure out we're calling DOES() and not isa(),
* and report eventual errors correctly. --rgs */
if ( strcmp(classname,"version") != 0 ) /* inherited new() */
sv_bless(rv, gv_stashpv(classname, GV_ADD));
- PUSHs(sv_2mortal(rv));
+ mPUSHs(rv);
PUTBACK;
return;
}
else
Perl_croak(aTHX_ "lobj is not of type version");
- PUSHs(sv_2mortal(vstringify(lobj)));
+ mPUSHs(vstringify(lobj));
PUTBACK;
return;
else
Perl_croak(aTHX_ "lobj is not of type version");
- PUSHs(sv_2mortal(vnumify(lobj)));
+ mPUSHs(vnumify(lobj));
PUTBACK;
return;
else
Perl_croak(aTHX_ "lobj is not of type version");
- PUSHs(sv_2mortal(vnormal(lobj)));
+ mPUSHs(vnormal(lobj));
PUTBACK;
return;
rs = newSViv(vcmp(lobj,rvs));
}
- PUSHs(sv_2mortal(rs));
+ mPUSHs(rs);
}
PUTBACK;
if (sv_derived_from(ST(0), "version")) {
SV * const lobj = SvRV(ST(0));
SV * const rs = newSViv( vcmp(lobj,new_version(newSVpvs("0"))) );
- PUSHs(sv_2mortal(rs));
+ mPUSHs(rs);
PUTBACK;
return;
}
}
else
{
- PUSHs(sv_2mortal(new_version(ver)));
+ mPUSHs(new_version(ver));
}
PUTBACK;
}
if (gv && (io = GvIO(gv))) {
- dTARGET;
AV* const av = PerlIO_get_layers(aTHX_ input ?
IoIFP(io) : IoOFP(io));
I32 i;
if (details) {
XPUSHs(namok
- ? newSVpvn(SvPVX_const(*namsvp), SvCUR(*namsvp))
+ ? sv_2mortal(newSVpvn(SvPVX_const(*namsvp), SvCUR(*namsvp)))
: &PL_sv_undef);
XPUSHs(argok
- ? newSVpvn(SvPVX_const(*argsvp), SvCUR(*argsvp))
+ ? sv_2mortal(newSVpvn(SvPVX_const(*argsvp), SvCUR(*argsvp)))
: &PL_sv_undef);
if (flgok)
- XPUSHi(SvIVX(*flgsvp));
+ mXPUSHi(SvIVX(*flgsvp));
else
XPUSHs(&PL_sv_undef);
nitem += 3;
}
else {
if (namok && argok)
- XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf"(%"SVf")",
+ XPUSHs(sv_2mortal(Perl_newSVpvf(aTHX_ "%"SVf"(%"SVf")",
SVfARG(*namsvp),
- SVfARG(*argsvp)));
+ SVfARG(*argsvp))));
else if (namok)
- XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf,
- SVfARG(*namsvp)));
+ XPUSHs(sv_2mortal(Perl_newSVpvf(aTHX_ "%"SVf,
+ SVfARG(*namsvp))));
else
XPUSHs(&PL_sv_undef);
nitem++;
const IV flags = SvIVX(*flgsvp);
if (flags & PERLIO_F_UTF8) {
- XPUSHs(newSVpvs("utf8"));
+ XPUSHs(newSVpvs_flags("utf8", SVs_TEMP));
nitem++;
}
}
if (items != 0)
Perl_croak(aTHX_ "Usage: Tie::Hash::NamedCapture::flags()");
- XPUSHs(sv_2mortal(newSVuv(RXapif_ONE)));
- XPUSHs(sv_2mortal(newSVuv(RXapif_ALL)));
+ mXPUSHu(RXapif_ONE);
+ mXPUSHu(RXapif_ALL);
PUTBACK;
return;
}