p4raw-id: //depot/perl@26269
typestr = sv_reftype(sv, 0);
- tsv = NEWSV(0,0);
+ tsv = sv_newmortal();
if (SvOBJECT(sv)) {
const char * const name = HvNAME_get(SvSTASH(sv));
Perl_sv_setpvf(aTHX_ tsv, "%s=%s(0x%"UVxf")",
}
else
Perl_sv_setpvf(aTHX_ tsv, "%s(0x%"UVxf")", typestr, PTR2UV(sv));
- goto tokensaveref;
+ if (lp)
+ *lp = SvCUR(tsv);
+ return SvPVX(tsv);
}
if (lp)
*lp = strlen(typestr);
if (SvROK(sv)) { /* XXX Skip this when sv_pvn_force calls */
/* Sneaky stuff here */
- tokensaveref:
if (!tsv)
tsv = newSVpvn(tmpbuf, len);
sv_2mortal(tsv);