if ((long) PL_mmap_page_size < 0) {
if (errno) {
SV *error = ERRSV;
- char *msg;
- STRLEN n_a;
(void) SvUPGRADE(error, SVt_PV);
- msg = SvPVx(error, n_a);
- Perl_croak(aTHX_ "panic: sysconf: %s", msg);
+ Perl_croak(aTHX_ "panic: sysconf: %s", SvPV_nolen_const(error));
}
else
Perl_croak(aTHX_ "panic: sysconf: pagesize unknown");
PUTBACK;
if (croak_on_error && SvTRUE(ERRSV)) {
- STRLEN n_a;
- Perl_croak(aTHX_ SvPVx(ERRSV, n_a));
+ Perl_croak(aTHX_ SvPVx_nolen_const(ERRSV));
}
return sv;
Perl_die_where(pTHX_ const char *message, STRLEN msglen)
{
dVAR;
- STRLEN n_a;
if (PL_in_eval) {
I32 cxix;
if (!SvPOK(err))
sv_setpvn(err,"",0);
else if (SvCUR(err) >= sizeof(prefix)+msglen-1) {
- e = SvPV(err, n_a);
- e += n_a - msglen;
+ STRLEN len;
+ e = SvPV(err, len);
+ e += len - msglen;
if (*e != *message || strNE(e,message))
e = Nullch;
}
PL_curcop = cx->blk_oldcop;
if (optype == OP_REQUIRE) {
- const char* msg = SvPVx(ERRSV, n_a);
+ const char* msg = SvPVx_nolen_const(ERRSV);
SV *nsv = cx->blk_eval.old_namesv;
(void)hv_store(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv),
&PL_sv_undef, 0);
if (PL_op->op_flags & OPf_STACKED) {
SV *sv = POPs;
- STRLEN n_a;
/* This egregious kludge implements goto &subroutine */
if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVCV) {
}
}
else {
- label = SvPV(sv,n_a);
+ label = SvPV_nolen_const(sv);
if (!(do_dump || *label))
DIE(aTHX_ must_have_label);
}
if (PL_multiline)
PL_op = PL_op->op_next; /* can't assume anything */
else {
- STRLEN n_a;
- match = *(SvPVx(GvSV(cCOP->cop_gv), n_a)) & 255;
+ match = *(SvPVx_nolen_const(GvSV(cCOP->cop_gv))) & 255;
match -= cCOP->uop.scop.scop_offset;
if (match < 0)
match = 0;
SV **newsp; /* Used by POPBLOCK. */
PERL_CONTEXT *cx = &cxstack[cxstack_ix];
I32 optype = 0; /* Might be reset by POPEVAL. */
- STRLEN n_a;
PL_op = saveop;
if (PL_eval_root) {
lex_end();
LEAVE;
if (optype == OP_REQUIRE) {
- const char* const msg = SvPVx(ERRSV, n_a);
+ const char* const msg = SvPVx_nolen_const(ERRSV);
const SV * const nsv = cx->blk_eval.old_namesv;
(void)hv_store(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv),
&PL_sv_undef, 0);
*msg ? msg : "Unknown error\n");
}
else if (startop) {
- const char* msg = SvPVx(ERRSV, n_a);
+ const char* msg = SvPVx_nolen_const(ERRSV);
POPBLOCK(cx,PL_curpm);
POPEVAL(cx);
(*msg ? msg : "Unknown error\n"));
}
else {
- const char* msg = SvPVx(ERRSV, n_a);
+ const char* msg = SvPVx_nolen_const(ERRSV);
if (!*msg) {
sv_setpv(ERRSV, "Compilation error");
}
|| (*name == ':' && name[1] != ':' && strchr(name+2, ':'))
#endif
) {
- STRLEN n_a;
- char *dir = SvPVx(dirsv, n_a);
+ const char *dir = SvPVx_nolen_const(dirsv);
#ifdef MACOS_TRADITIONAL
char buf1[256];
char buf2[256];
sv_catpv(msg, " (did you run h2ph?)");
sv_catpv(msg, " (@INC contains:");
for (i = 0; i <= AvFILL(ar); i++) {
- STRLEN n_a;
- const char *dir = SvPVx(*av_fetch(ar, i, TRUE), n_a);
+ const char *dir = SvPVx_nolen_const(*av_fetch(ar, i, TRUE));
Perl_sv_setpvf(aTHX_ dirmsgsv, " %s", dir);
sv_catsv(msg, dirmsgsv);
}
GV *gv;
I32 gimme;
I32 max = 13;
- STRLEN n_a;
if (PL_op->op_flags & OPf_REF) {
gv = cGVOP_gv;
"lstat() on filehandle %s", GvENAME(gv));
goto do_fstat;
}
- sv_setpv(PL_statname, SvPV_const(sv,n_a));
+ sv_setpv(PL_statname, SvPV_nolen_const(sv));
PL_statgv = Nullgv;
PL_laststype = PL_op->op_type;
if (PL_op->op_type == OP_LSTAT)
- PL_laststatval = PerlLIO_lstat(SvPV(PL_statname, n_a), &PL_statcache);
+ PL_laststatval = PerlLIO_lstat(SvPV_nolen_const(PL_statname), &PL_statcache);
else
- PL_laststatval = PerlLIO_stat(SvPV(PL_statname, n_a), &PL_statcache);
+ PL_laststatval = PerlLIO_stat(SvPV_nolen_const(PL_statname), &PL_statcache);
if (PL_laststatval < 0) {
- if (ckWARN(WARN_NEWLINE) && strchr(SvPV(PL_statname, n_a), '\n'))
+ if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname), '\n'))
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
max = 0;
}
dXSARGS;
SV *sv;
const char *name;
- STRLEN n_a;
if (items != 2)
Perl_croak(aTHX_ "Usage: UNIVERSAL::isa(reference, kind)");
|| (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv))))
XSRETURN_UNDEF;
- name = SvPV_const(ST(1),n_a);
+ name = SvPV_nolen_const(ST(1));
ST(0) = boolSV(sv_derived_from(sv, name));
XSRETURN(1);
const char *name;
SV *rv;
HV *pkg = NULL;
- STRLEN n_a;
if (items != 2)
Perl_croak(aTHX_ "Usage: UNIVERSAL::can(object-ref, method)");
|| (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv))))
XSRETURN_UNDEF;
- name = SvPV_const(ST(1),n_a);
+ name = SvPV_nolen_const(ST(1));
rv = &PL_sv_undef;
if (SvROK(sv)) {
"%s does not define $%s::VERSION--version check failed",
name, name);
} else {
- STRLEN n_a;
Perl_croak(aTHX_
"%s defines neither package nor VERSION--version check failed",
- SvPVx(ST(0),n_a) );
+ SvPVx_nolen_const(ST(0)) );
}
}