Mercurial > hg > nginx
comparison src/core/ngx_regex.c @ 294:5cfd65b8b0a7
nginx-0.0.3-2004-03-23-09:01:52 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 23 Mar 2004 06:01:52 +0000 |
parents | 87e73f067470 |
children | 02a511569afb |
comparison
equal
deleted
inserted
replaced
293:ec3c049681fd | 294:5cfd65b8b0a7 |
---|---|
40 "pcre_compile() failed: %s in \"%s\" at \"%s\"", | 40 "pcre_compile() failed: %s in \"%s\" at \"%s\"", |
41 errstr, pattern->data, pattern->data + erroff); | 41 errstr, pattern->data, pattern->data + erroff); |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 /* ensure that there is no current pool */ | |
46 | |
47 ngx_pcre_pool = NULL; | |
48 | |
45 return re; | 49 return re; |
46 } | 50 } |
47 | 51 |
48 | 52 |
49 ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s, | 53 ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s, |
62 } | 66 } |
63 | 67 |
64 | 68 |
65 static void *ngx_regex_malloc(size_t size) | 69 static void *ngx_regex_malloc(size_t size) |
66 { | 70 { |
67 return ngx_palloc(ngx_pcre_pool, size); | 71 if (ngx_pcre_pool) { |
72 return ngx_palloc(ngx_pcre_pool, size); | |
73 } | |
74 | |
75 return NULL; | |
68 } | 76 } |
69 | 77 |
70 | 78 |
71 static void ngx_regex_free(void *p) | 79 static void ngx_regex_free(void *p) |
72 { | 80 { |