diff options
author | Valentin Bartenev <vbart@nginx.com> | 2011-12-26 17:10:36 +0400 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2011-12-26 17:10:36 +0400 |
commit | bc5191c7bcfb7df191cbe411882eab9a1c71e518 (patch) | |
tree | 8e35857c295a4b8d0612a4ae33d1e1fe47ead960 /src/core/ngx_regex.h | |
parent | 947bdfa7fe9559ccbc9c47a49105d78b9b674a64 (diff) |
Added support for regex study and PCRE JIT (ticket #41) optimizations on
configuration phase.
Diffstat (limited to 'src/core/ngx_regex.h')
-rw-r--r-- | src/core/ngx_regex.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/ngx_regex.h b/src/core/ngx_regex.h index fc35059b3..52d059e5c 100644 --- a/src/core/ngx_regex.h +++ b/src/core/ngx_regex.h @@ -18,7 +18,11 @@ #define NGX_REGEX_CASELESS PCRE_CASELESS -typedef pcre ngx_regex_t; + +typedef struct { + pcre *pcre; + pcre_extra *extra; +} ngx_regex_t; typedef struct { @@ -45,7 +49,7 @@ void ngx_regex_init(void); ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc); #define ngx_regex_exec(re, s, captures, size) \ - pcre_exec(re, NULL, (const char *) (s)->data, (s)->len, 0, 0, \ + pcre_exec(re->pcre, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \ captures, size) #define ngx_regex_exec_n "pcre_exec()" |