diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-07-02 17:52:28 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-07-02 17:52:28 +0000 |
commit | 66f468ffd4dfc5eb6da90613c4dbf6b543aed748 (patch) | |
tree | 565b341c030ea3f64baf71b7e658b7f957561285 /pcretest.c | |
parent | 519c406188840c1e4ab94261e2430d87bfa4b794 (diff) | |
download | pcre-66f468ffd4dfc5eb6da90613c4dbf6b543aed748.tar.gz |
Small performance improvement in strlen16 and strlen32 in pcretest.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1345 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcretest.c')
-rw-r--r-- | pcretest.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2031,9 +2031,9 @@ return yield; static int strlen16(PCRE_SPTR16 p) { -int len = 0; -while (*p++ != 0) len++; -return len; +PCRE_SPTR16 pp = p; +while (*pp != 0) pp++; +return (int)(pp - p); } #endif /* SUPPORT_PCRE16 */ @@ -2046,9 +2046,9 @@ return len; static int strlen32(PCRE_SPTR32 p) { -int len = 0; -while (*p++ != 0) len++; -return len; +PCRE_SPTR32 pp = p; +while (*pp != 0) pp++; +return (int)(pp - p); } #endif /* SUPPORT_PCRE32 */ |