diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-06-26 16:25:16 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2017-06-26 16:25:16 +0000 |
commit | e4aaaaba774f45e7c5247a45a31991dae10b1f67 (patch) | |
tree | cd47e837c352f3b162c1568ba17918d210416381 /src/pcre2_internal.h | |
parent | 64fb27889f32d75f97e3146c382208205531dc32 (diff) | |
download | pcre2-e4aaaaba774f45e7c5247a45a31991dae10b1f67.tar.gz |
Increase limit for "must be present" code units for 8-bit searches, which use
memchr().
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@836 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_internal.h')
-rw-r--r-- | src/pcre2_internal.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pcre2_internal.h b/src/pcre2_internal.h index 02e1b9f..bc52b9a 100644 --- a/src/pcre2_internal.h +++ b/src/pcre2_internal.h @@ -557,9 +557,14 @@ enum { PCRE2_MATCHEDBY_INTERPRETER, /* pcre2_match() */ #define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */ /* The maximum remaining length of subject we are prepared to search for a -req_unit match. */ +req_unit match. In 8-bit mode, memchr() is used and is much faster than the +search loop that has to be used in 16-bit and 32-bit modes. */ +#if PCRE2_CODE_UNIT_WIDTH == 8 +#define REQ_CU_MAX 2000 +#else #define REQ_CU_MAX 1000 +#endif /* Offsets for the bitmap tables in the cbits set of tables. Each table contains a set of bits for a class map. Some classes are built by combining |