comparison src/core/ngx_regex.h @ 4638:6e1a48bcf915

Fixed the ngx_regex.h header file compatibility with C++.
author Valentin Bartenev <vbart@nginx.com>
date Thu, 17 May 2012 13:47:04 +0000
parents d620f497c50f
children 0b5f12d5c531
comparison
equal deleted inserted replaced
4637:668ab1a21327 4638:6e1a48bcf915
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