From: Nicholas Clark Date: Sat, 1 Jan 2005 20:48:31 +0000 (+0000) Subject: Probably should be using *pvn rather than *pv forms for speed in X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4147a61ba719a000c9f47c480a9c3401b7354d04;p=p5sagit%2Fp5-mst-13.2.git Probably should be using *pvn rather than *pv forms for speed in toke.c (to save a strlen()) p4raw-id: //depot/perl@23726 --- diff --git a/toke.c b/toke.c index ea3714e..448ede1 100644 --- a/toke.c +++ b/toke.c @@ -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;