summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-02-02 22:10:39 +0000
committerNicholas Clark <nick@ccl4.org>2007-02-02 22:10:39 +0000
commit6502358f02d6c4ea5159a32e117a91663131f6af (patch)
tree78916cd82f44f8a73bb75941c4fddc06ae9b00f4
parent52e3301553fd75a357b90153aa727915aa35751e (diff)
downloadperl-6502358f02d6c4ea5159a32e117a91663131f6af.tar.gz
A few more places where we know the length for sv_setpv() or sv_catpv()
p4raw-id: //depot/perl@30101
-rw-r--r--mg.c2
-rw-r--r--op.c2
-rw-r--r--pp_ctl.c2
-rw-r--r--toke.c8
4 files changed, 7 insertions, 7 deletions
diff --git a/mg.c b/mg.c
index a3e0f26b4b..ecd8ad5e52 100644
--- a/mg.c
+++ b/mg.c
@@ -1186,7 +1186,7 @@ Perl_magic_getsig(pTHX_ SV *sv, MAGIC *mg)
#endif
/* cache state so we don't fetch it again */
if(sigstate == (Sighandler_t) SIG_IGN)
- sv_setpv(sv,"IGNORE");
+ sv_setpvs(sv,"IGNORE");
else
sv_setsv(sv,&PL_sv_undef);
PL_psig_ptr[i] = SvREFCNT_inc_simple_NN(sv);
diff --git a/op.c b/op.c
index bb2a32cbe8..f46f54356b 100644
--- a/op.c
+++ b/op.c
@@ -4899,7 +4899,7 @@ Perl_cv_ckproto_len(pTHX_ const CV *cv, const GV *gv, const char *p,
if (gv)
gv_efullname3(name = sv_newmortal(), gv, NULL);
- sv_setpv(msg, "Prototype mismatch:");
+ sv_setpvs(msg, "Prototype mismatch:");
if (name)
Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, SVfARG(name));
if (SvPOK(cv))
diff --git a/pp_ctl.c b/pp_ctl.c
index 10e3370359..51180cf8fa 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2971,7 +2971,7 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
}
else {
if (!*msg) {
- sv_setpv(ERRSV, "Compilation error");
+ sv_setpvs(ERRSV, "Compilation error");
}
}
PERL_UNUSED_VAR(newsp);
diff --git a/toke.c b/toke.c
index e34f796a7f..46066d14fd 100644
--- a/toke.c
+++ b/toke.c
@@ -1026,10 +1026,10 @@ S_skipspace(pTHX_ register char *s)
/* XXX these shouldn't really be added here, can't set PL_faketokens */
if (PL_minus_p) {
#ifdef PERL_MAD
- sv_catpv(PL_linestr,
+ sv_catpvs(PL_linestr,
";}continue{print or die qq(-p destination: $!\\n);}");
#else
- sv_setpv(PL_linestr,
+ sv_setpvs(PL_linestr,
";}continue{print or die qq(-p destination: $!\\n);}");
#endif
PL_minus_n = PL_minus_p = 0;
@@ -6599,8 +6599,8 @@ Perl_yylex(pTHX)
if (PL_madskills)
nametoke = newSVpvn(s, d - s);
#endif
- if (strchr(tmpbuf, ':'))
- sv_setpv(PL_subname, tmpbuf);
+ if (memchr(tmpbuf, ':', len))
+ sv_setpvn(PL_subname, tmpbuf, len);
else {
sv_setsv(PL_subname,PL_curstname);
sv_catpvs(PL_subname,"::");