text = POPs;
len = SvLEN(text);
- reallen = strlen(SvPV(text,PL_na));
+ reallen = strlen(SvPV_nolen(text));
/*
* Empty code references or XS functions are deparsed as
* "(prototype) ;" or ";".
*/
- if (len == 0 || *(SvPV(text,PL_na)+reallen-1) == ';') {
+ if (len == 0 || *(SvPV_nolen(text)+reallen-1) == ';') {
CROAK(("The result of B::Deparse::coderef2text was empty - maybe you're trying to serialize an XS function?\n"));
}
PUTMARK(SX_CODE);
TRACEME(("size = %d", len));
- TRACEME(("code = %s", SvPV(text,PL_na)));
+ TRACEME(("code = %s", SvPV_nolen(text)));
/*
* Now store the source code.
*/
- STORE_SCALAR(SvPV(text,PL_na), len);
+ STORE_SCALAR(SvPV_nolen(text), len);
FREETMPS;
LEAVE;
*/
sub = newSVpvn("sub ", 4);
- sv_catpv(sub, SvPV(text, PL_na)); /* XXX no sv_catsv! */
+ sv_catpv(sub, SvPV_nolen(text)); /* XXX no sv_catsv! */
SvREFCNT_dec(text);
/*
CROAK(("Unexpected return value from $Storable::Eval callback\n"));
cv = POPs;
if (SvTRUE(errsv)) {
- CROAK(("code %s caused an error: %s", SvPV(sub, PL_na), SvPV(errsv, PL_na)));
+ CROAK(("code %s caused an error: %s",
+ SvPV_nolen(sub), SvPV_nolen(errsv)));
}
PUTBACK;
} else {
- cv = eval_pv(SvPV(sub, PL_na), TRUE);
+ cv = eval_pv(SvPV_nolen(sub), TRUE);
}
if (cv && SvROK(cv) && SvTYPE(SvRV(cv)) == SVt_PVCV) {
sv = SvRV(cv);
} else {
- CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV(sub, PL_na)));
+ CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV_nolen(sub)));
}
SvREFCNT_inc(sv); /* XXX seems to be necessary */
return sv;
}
digit = SvIVX(*av_fetch((AV *)vs, 0, 0));
- Perl_sv_setpvf(aTHX_ sv,"%d",digit);
+ Perl_sv_setpvf(aTHX_ sv,"%"IVdf,(IV)digit);
for ( i = 1 ; i <= len ; i++ )
{
digit = SvIVX(*av_fetch((AV *)vs, i, 0));
if ( digit < 0 )
- Perl_sv_catpvf(aTHX_ sv,"_%d",-digit);
+ Perl_sv_catpvf(aTHX_ sv,"_%"IVdf,(IV)-digit);
else
- Perl_sv_catpvf(aTHX_ sv,".%d",digit);
+ Perl_sv_catpvf(aTHX_ sv,".%"IVdf,(IV)digit);
}
if ( len == 0 )
Perl_sv_catpv(aTHX_ sv,".0");