Mercurial > hg > nginx-ranges
annotate src/core/ngx_list.h @ 36:a39d1b793287 NGINX_0_1_18
nginx 0.1.18
*) Workaround: the default values of the devpoll_events and the
devpoll_changes directives changed from 512 to 32 to be compatible
with Solaris 10.
*) Bugfix: the proxy_set_x_var and fastcgi_set_var directives were not
inherited.
*) Bugfix: in the redirect rewrite directive the arguments were
concatenated with URI by the "&" rather than the "?".
*) Bugfix: the lines without trailing ";" in the file being included by
the ngx_http_geo_module were silently ignored.
*) Feature: the ngx_http_stub_status_module.
*) Bugfix: the unknown log format in the access_log directive caused
the segmentation fault.
*) Feature: the new "document_root" parameter of the fastcgi_params
directive.
*) Feature: the fastcgi_redirect_errors directive.
*) Feature: the new "break" modifier of the "rewrite" directive allows
to stop the rewrite/location cycle and sets the current
configuration to the request.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 09 Feb 2005 00:00:00 +0300 |
parents | 74b1868dd3cd |
children | 72eb30262aac |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_LIST_H_INCLUDED_ | |
8 #define _NGX_LIST_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 | |
14 | |
15 typedef struct ngx_list_part_s ngx_list_part_t; | |
16 | |
17 struct ngx_list_part_s { | |
18 void *elts; | |
19 ngx_uint_t nelts; | |
20 ngx_list_part_t *next; | |
21 }; | |
22 | |
23 | |
24 typedef struct { | |
25 ngx_list_part_t *last; | |
26 ngx_list_part_t part; | |
27 size_t size; | |
28 ngx_uint_t nalloc; | |
29 ngx_pool_t *pool; | |
30 } ngx_list_t; | |
31 | |
32 | |
16 | 33 static ngx_inline ngx_int_t ngx_list_init(ngx_list_t *list, ngx_pool_t *pool, |
0 | 34 ngx_uint_t n, size_t size) |
35 { | |
36 if (!(list->part.elts = ngx_palloc(pool, n * size))) { | |
37 return NGX_ERROR; | |
38 } | |
39 | |
40 list->part.nelts = 0; | |
41 list->part.next = NULL; | |
42 list->last = &list->part; | |
43 list->size = size; | |
44 list->nalloc = n; | |
45 list->pool = pool; | |
46 | |
47 return NGX_OK; | |
48 } | |
49 | |
50 | |
51 /* | |
52 * | |
53 * the iteration through the list: | |
54 * | |
55 * part = &list.part; | |
56 * data = part->elts; | |
57 * | |
58 * for (i = 0 ;; i++) { | |
59 * | |
60 * if (i >= part->nelts) { | |
61 * if (part->next == NULL) { | |
62 * break; | |
63 * } | |
64 * | |
65 * part = part->next; | |
66 * data = part->elts; | |
67 * i = 0; | |
68 * } | |
69 * | |
70 * ... data[i] ... | |
71 * | |
72 * } | |
73 */ | |
74 | |
75 | |
76 void *ngx_list_push(ngx_list_t *list); | |
77 | |
78 | |
79 #endif /* _NGX_LIST_H_INCLUDED_ */ |