{
register I32 count;
STRLEN len;
- STRLEN n_a;
char *s;
char *temp_buffer = NULL;
SV* svrecode = Nullsv;
count += rs_charlen;
}
}
- s = SvPV_force(sv, n_a);
+ s = SvPV_force_nolen(sv);
SvCUR_set(sv, len);
*SvEND(sv) = '\0';
SvNIOK_off(sv);
{
dVAR;
SV *t = sv_newmortal();
- STRLEN n_a;
int unref = 0;
sv_setpvn(t, "", 0);
while (unref--)
sv_catpv(t, ")");
}
- return SvPV(t, n_a);
+ return SvPV_nolen(t);
}
void
if ( ! PL_op->op_flags & OPf_SPECIAL) { /* not lexical */
if (cSVOPo->op_sv) {
SV *tmpsv = NEWSV(0,0);
- STRLEN n_a;
ENTER;
SAVEFREESV(tmpsv);
gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch);
- Perl_dump_indent(aTHX_ level, file, "GV = %s\n", SvPV(tmpsv, n_a));
+ Perl_dump_indent(aTHX_ level, file, "GV = %s\n",
+ SvPV_const_nolen(tmpsv));
LEAVE;
}
else
sR |OP* |newDEFSVOP
sR |OP* |new_logop |I32 type|I32 flags|NN OP **firstp|NN OP **otherp
s |void |simplify_sort |NN OP *o
-s |char* |gv_ename |GV *gv
+s |const char* |gv_ename |GV *gv
s |bool |scalar_mod_type|const OP *o|I32 type
s |OP * |my_kid |OP *o|OP *attrs|OP **imopsp
s |OP * |dup_attrlist |OP *o
}
magic_get(sv,mg);
if (!SvPOK(sv) && SvNIOK(sv)) {
- STRLEN n_a;
- sv_2pv(sv, &n_a);
+ sv_2pv(sv, 0);
}
if (SvPOK(sv))
return SvCUR(sv);
#define RETURN_UNLIMITED_NUMBER (PERL_INT_MAX / 2)
-STATIC char*
+STATIC const char*
S_gv_ename(pTHX_ GV *gv)
{
- STRLEN n_a;
SV* tmpsv = sv_newmortal();
gv_efullname3(tmpsv, gv, Nullch);
- return SvPV(tmpsv,n_a);
+ return SvPV_nolen_const(tmpsv);
}
STATIC OP *
Perl_newLOOPEX(pTHX_ I32 type, OP *label)
{
OP *o;
- STRLEN n_a;
if (type != OP_GOTO || label->op_type == OP_CONST) {
/* "last()" means "last" */
o = newOP(type, OPf_SPECIAL);
else {
o = newPVOP(type, 0, savepv(label->op_type == OP_CONST
- ? SvPVx_const(((SVOP*)label)->op_sv, n_a)
+ ? SvPVx_nolen_const(((SVOP*)label)->op_sv)
: ""));
}
op_free(label);
Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
{
dVAR;
- STRLEN n_a;
const char *aname;
GV *gv;
const char *ps;
register CV *cv=0;
SV *const_sv;
- const char * const name = o ? SvPVx_const(cSVOPo->op_sv, n_a) : Nullch;
+ const char * const name = o ? SvPVx_nolen_const(cSVOPo->op_sv) : Nullch;
if (proto) {
assert(proto->op_type == OP_CONST);
I32 arg = 0;
I32 contextclass = 0;
char *e = 0;
- STRLEN n_a;
bool delete_op = 0;
o->op_private |= OPpENTERSUB_HASTARG;
else {
if (SvPOK(cv)) {
namegv = CvANON(cv) ? gv : CvGV(cv);
- proto = SvPV((SV*)cv, n_a);
+ proto = SvPV_nolen((SV*)cv);
}
if (CvASSERTION(cv)) {
if (PL_hints & HINT_ASSERTING) {
offset = 0;
if (type == OP_RCATLINE && SvOK(sv)) {
if (!SvPOK(sv)) {
- STRLEN n_a;
- (void)SvPV_force(sv, n_a);
+ SvPV_force_nolen(sv);
}
offset = SvCUR(sv);
}
sym = SvPOKp(sv) ? SvPVX_const(sv) : Nullch;
}
else {
- STRLEN n_a;
- sym = SvPV(sv, n_a);
+ sym = SvPV_nolen_const(sv);
}
if (!sym)
DIE(aTHX_ PL_no_usym, "a subroutine");
STATIC SV *
S_is_an_int(pTHX_ const char *s, STRLEN l)
{
- STRLEN n_a;
SV *result = newSVpvn(s, l);
- char *result_c = SvPV(result, n_a); /* convenience */
+ char *result_c = SvPV_nolen(result); /* convenience */
char *out = result_c;
bool skip = 1;
bool ignore = 0;
struct timeval *tbuf = &timebuf;
I32 growsize;
char *fd_sets[4];
- STRLEN n_a;
#if BYTEORDER != 0x1234 && BYTEORDER != 0x12345678
I32 masksize;
I32 offset;
continue;
}
else if (!SvPOK(sv))
- SvPV_force(sv,n_a); /* force string conversion */
+ SvPV_force_nolen(sv); /* force string conversion */
j = SvLEN(sv);
if (j < growsize) {
Sv_Grow(sv, growsize);
unsigned long a[20];
register I32 i = 0;
I32 retval = -1;
- STRLEN n_a;
if (PL_tainting) {
while (++MARK <= SP) {
else if (*MARK == &PL_sv_undef)
a[i++] = 0;
else
- a[i++] = (unsigned long)SvPV_force(*MARK, n_a);
+ a[i++] = (unsigned long)SvPV_force_nolen(*MARK);
if (i > 15)
break;
}
STATIC void S_simplify_sort(pTHX_ OP *o)
__attribute__nonnull__(pTHX_1);
-STATIC char* S_gv_ename(pTHX_ GV *gv);
+STATIC const char* S_gv_ename(pTHX_ GV *gv);
STATIC bool S_scalar_mod_type(pTHX_ const OP *o, I32 type);
STATIC OP * S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp);
STATIC OP * S_dup_attrlist(pTHX_ OP *o);
{ /* Assume that RE_INTUIT is set */
GET_RE_DEBUG_FLAGS_DECL;
DEBUG_COMPILE_r(
- { STRLEN n_a;
- const char *s = SvPV(prog->check_substr
- ? prog->check_substr : prog->check_utf8, n_a);
+ {
+ const char *s = SvPV_nolen_const(prog->check_substr
+ ? prog->check_substr : prog->check_utf8);
if (!PL_colorset) reginitcolors();
PerlIO_printf(Perl_debug_log,
/* tainted $TERM is okay if it contains no metachars */
svp = hv_fetch(GvHVn(PL_envgv),"TERM",4,FALSE);
if (svp && *svp && SvTAINTED(*svp)) {
- STRLEN n_a;
+ STRLEN len;
const bool was_tainted = PL_tainted;
- char *t = SvPV(*svp, n_a);
- char *e = t + n_a;
+ const char *t = SvPV(*svp, len);
+ const char *e = t + len;
PL_tainted = was_tainted;
if (t < e && isALNUM(*t))
t++;
/* Check the eval first */
if (!PL_in_eval && SvTRUE(ERRSV)) {
- STRLEN n_a;
sv_catpv(ERRSV, "Propagated");
- yyerror(SvPV(ERRSV, n_a)); /* Duplicates the message inside eval */
+ yyerror(SvPV_nolen_const(ERRSV)); /* Duplicates the message inside eval */
(void)POPs;
res = SvREFCNT_inc(sv);
}