aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-23 13:13:58 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-11-23 13:13:58 +0000
commit6956db069653311d2d14b3d3a0f4e59bdeda9ae2 (patch)
tree35825096b0c7c17cca2bab0dac01ca6b8a576843 /src/http/ngx_http_variables.h
parent0bd426def165c7200012a20439abc6abc8bffaa3 (diff)
downloadnginx-6956db069653311d2d14b3d3a0f4e59bdeda9ae2.tar.gz
nginx-6956db069653311d2d14b3d3a0f4e59bdeda9ae2.zip
fix building without PCRE, the bug had been introduced in r3326
Diffstat (limited to 'src/http/ngx_http_variables.h')
-rw-r--r--src/http/ngx_http_variables.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/http/ngx_http_variables.h b/src/http/ngx_http_variables.h
index 2056befc5..80ce49321 100644
--- a/src/http/ngx_http_variables.h
+++ b/src/http/ngx_http_variables.h
@@ -41,21 +41,6 @@ struct ngx_http_variable_s {
};
-typedef struct {
- ngx_uint_t capture;
- ngx_int_t index;
-} ngx_http_regex_variable_t;
-
-
-typedef struct {
- ngx_regex_t *regex;
- ngx_uint_t ncaptures;
- ngx_http_regex_variable_t *variables;
- ngx_uint_t nvariables;
- ngx_str_t name;
-} ngx_http_regex_t;
-
-
ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name,
ngx_uint_t flags);
ngx_int_t ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name);
@@ -74,11 +59,30 @@ ngx_int_t ngx_http_variable_unknown_header(ngx_http_variable_value_t *v,
#define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
+#if (NGX_PCRE)
+
+typedef struct {
+ ngx_uint_t capture;
+ ngx_int_t index;
+} ngx_http_regex_variable_t;
+
+
+typedef struct {
+ ngx_regex_t *regex;
+ ngx_uint_t ncaptures;
+ ngx_http_regex_variable_t *variables;
+ ngx_uint_t nvariables;
+ ngx_str_t name;
+} ngx_http_regex_t;
+
+
ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf,
ngx_regex_compile_t *rc);
ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re,
ngx_str_t *s);
+#endif
+
ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);