we already know the string length.
p4raw-id: //depot/perl@32105
const Size_t cmdlen = strlen(incmd) + 1;
Newx(buf, cmdlen, char);
cmd = buf;
- my_strlcpy(cmd, incmd, cmdlen);
+ memcpy(cmd, incmd, cmdlen);
while (*cmd && isSPACE(*cmd))
cmd++;
Perl_xmldump_indent(aTHX_ level, file, "<pmop \n");
level++;
if (PM_GETRE(pm)) {
- const char * const s = PM_GETRE(pm)->precomp;
- SV * const tmpsv = newSVpvn("",0);
+ const regexp *const r = PM_GETRE(pm);
+ SV * const tmpsv = newSVpvn(r->precomp,r->prelen);
SvUTF8_on(tmpsv);
- sv_catxmlpvn(tmpsv, s, strlen(s), 1);
Perl_xmldump_indent(aTHX_ level, file, "pre=\"%s\"\n",
SvPVX(tmpsv));
SvREFCNT_dec(tmpsv);
classname = ST(0);
- classname_pv = SvPV_nolen(classname);
- classname_len = strlen(classname_pv);
+ classname_pv = SvPV(classname,classname_len);
he = hv_fetch_ent(PL_isarev, classname, 0, 0);
isarev = he ? (HV*)HeVAL(he) : NULL;
SV * const sv = kid->op_sv;
U32 was_readonly = SvREADONLY(sv);
char *s;
+ STRLEN len;
+ const char *end;
if (was_readonly) {
if (SvFAKE(sv)) {
}
}
- for (s = SvPVX(sv); *s; s++) {
+ s = SvPVX(sv);
+ len = SvCUR(sv);
+ end = s + len;
+ for (; s < end; s++) {
if (*s == ':' && s[1] == ':') {
- const STRLEN len = strlen(s+2)+1;
*s = '/';
- Move(s+2, s+1, len, char);
- SvCUR_set(sv, SvCUR(sv) - 1);
+ Move(s+2, s+1, end - s, char);
+ --end;
}
}
+ SvEND_set(sv, end);
sv_catpvs(sv, ".pm");
SvFLAGS(sv) |= was_readonly;
}