diff options
author | Gisle Aas <gisle@activestate.com> | 2005-12-28 12:38:03 +0000 |
---|---|---|
committer | Gisle Aas <gisle@activestate.com> | 2005-12-28 12:38:03 +0000 |
commit | e81b061508e67c847690930e86f0a3899c902c62 (patch) | |
tree | d83d8a0f31d160ee858de818cdcbf7347c489357 /toke.c | |
parent | 4c8626beeba549aaf3f327729c56a599716ee8b7 (diff) | |
download | perl-e81b061508e67c847690930e86f0a3899c902c62.tar.gz |
Use memchr() instead of ninstr() to locate the end-of-line.
The call to memchr() will faster.
p4raw-id: //depot/perl@26512
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -9706,7 +9706,6 @@ S_scan_heredoc(pTHX_ register char *s) I32 len; SV *tmpstr; char term; - const char newline[] = "\n"; const char *found_newline; register char *d; register char *e; @@ -9768,7 +9767,7 @@ S_scan_heredoc(pTHX_ register char *s) s = olds; } #endif - if ( outer || !(found_newline = ninstr(s,PL_bufend,newline,newline+1)) ) { + if ( outer || !(found_newline = memchr(s, '\n', PL_bufend - s)) ) { herewas = newSVpvn(s,PL_bufend-s); } else { |