diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-02-02 22:10:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-02-02 22:10:39 +0000 |
commit | 6502358f02d6c4ea5159a32e117a91663131f6af (patch) | |
tree | 78916cd82f44f8a73bb75941c4fddc06ae9b00f4 | |
parent | 52e3301553fd75a357b90153aa727915aa35751e (diff) | |
download | perl-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.c | 2 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | pp_ctl.c | 2 | ||||
-rw-r--r-- | toke.c | 8 |
4 files changed, 7 insertions, 7 deletions
@@ -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); @@ -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)) @@ -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); @@ -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,"::"); |