Mercurial > hg > nginx
comparison src/core/ngx_regex.h @ 4711:7cb78d9289b8 stable-1.2
Merge of r4639, r4640: C++ fixes.
Fixed the ngx_regex.h header file compatibility with C++. Fixed
building --with-cpp_test_module on some systems.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 29 Jun 2012 17:32:43 +0000 |
parents | d620f497c50f |
children | 0b5f12d5c531 |
comparison
equal
deleted
inserted
replaced
4710:5a4666d4b6cb | 4711:7cb78d9289b8 |
---|---|
19 | 19 |
20 #define NGX_REGEX_CASELESS PCRE_CASELESS | 20 #define NGX_REGEX_CASELESS PCRE_CASELESS |
21 | 21 |
22 | 22 |
23 typedef struct { | 23 typedef struct { |
24 pcre *pcre; | 24 pcre *code; |
25 pcre_extra *extra; | 25 pcre_extra *extra; |
26 } ngx_regex_t; | 26 } ngx_regex_t; |
27 | 27 |
28 | 28 |
29 typedef struct { | 29 typedef struct { |
48 | 48 |
49 void ngx_regex_init(void); | 49 void ngx_regex_init(void); |
50 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc); | 50 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc); |
51 | 51 |
52 #define ngx_regex_exec(re, s, captures, size) \ | 52 #define ngx_regex_exec(re, s, captures, size) \ |
53 pcre_exec(re->pcre, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \ | 53 pcre_exec(re->code, re->extra, (const char *) (s)->data, (s)->len, 0, 0, \ |
54 captures, size) | 54 captures, size) |
55 #define ngx_regex_exec_n "pcre_exec()" | 55 #define ngx_regex_exec_n "pcre_exec()" |
56 | 56 |
57 ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log); | 57 ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log); |
58 | 58 |