diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-12-31 22:46:25 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-12-31 22:46:25 +0000 |
commit | e963d6d20fd5c6e0abfa3424e06c2c839218e5ba (patch) | |
tree | 76c661570b70508bd2ff532ca2b691f73317fb25 | |
parent | b9b0e72cfd70190901b2b8d5f3a90109745b85d6 (diff) | |
download | perl-e963d6d20fd5c6e0abfa3424e06c2c839218e5ba.tar.gz |
Doing the strnEQ char by char for 2 and 3 character strings
generates a smaller object file, and will be faster.
p4raw-id: //depot/perl@23721
-rw-r--r-- | doio.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1141,7 +1141,7 @@ Perl_mode_from_discipline(pTHX_ SV *discp) if (*s == ':') { switch (s[1]) { case 'r': - if (len > 3 && strnEQ(s+1, "raw", 3) + if (s[2] == 'a' && s[3] == 'w' && (!s[4] || s[4] == ':' || isSPACE(s[4]))) { mode = O_BINARY; @@ -1151,7 +1151,7 @@ Perl_mode_from_discipline(pTHX_ SV *discp) } /* FALL THROUGH */ case 'c': - if (len > 4 && strnEQ(s+1, "crlf", 4) + if (s[2] == 'r' && s[3] == 'l' && s[4] == 'f' && (!s[5] || s[5] == ':' || isSPACE(s[5]))) { mode = O_TEXT; |