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 /toke.c | |
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
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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,"::"); |