diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-01-01 20:48:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-01-01 20:48:31 +0000 |
commit | 4147a61ba719a000c9f47c480a9c3401b7354d04 (patch) | |
tree | 2be6ad868138ae94e3b441ae03ea2897ac5ed70c /toke.c | |
parent | 770526c17acd97e1e85c98bfca98d1d4b69f53f8 (diff) | |
download | perl-4147a61ba719a000c9f47c480a9c3401b7354d04.tar.gz |
Probably should be using *pvn rather than *pv forms for speed in
toke.c (to save a strlen())
p4raw-id: //depot/perl@23726
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -723,7 +723,7 @@ S_skipspace(pTHX_ register char *s) PL_minus_n = PL_minus_p = 0; } else - sv_setpv(PL_linestr,";"); + sv_setpvn(PL_linestr,";", 1); /* reset variables for next time we lex */ PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = s = PL_linestart @@ -2568,12 +2568,12 @@ Perl_yylex(pTHX) PL_preambled = TRUE; sv_setpv(PL_linestr,incl_perldb()); if (SvCUR(PL_linestr)) - sv_catpv(PL_linestr,";"); + sv_catpvn(PL_linestr,";", 1); if (PL_preambleav){ while(AvFILLp(PL_preambleav) >= 0) { SV *tmpsv = av_shift(PL_preambleav); sv_catsv(PL_linestr, tmpsv); - sv_catpv(PL_linestr, ";"); + sv_catpvn(PL_linestr, ";", 1); sv_free(tmpsv); } sv_free((SV*)PL_preambleav); @@ -2608,7 +2608,7 @@ Perl_yylex(pTHX) sv_catpv(PL_linestr,"our @F=split(' ');"); } } - sv_catpv(PL_linestr, "\n"); + sv_catpvn(PL_linestr, "\n", 1); PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = Nullch; |