Mercurial > hg > nginx-mail
comparison src/core/ngx_hash.h @ 312:429900ca25ee NGINX_0_6_0
nginx 0.6.0
*) Feature: the "server_name", "map", and "valid_referers" directives
support the "www.example.*" wildcards.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 14 Jun 2007 00:00:00 +0400 |
parents | 95d92ec39071 |
children | 34fb3a573548 |
comparison
equal
deleted
inserted
replaced
311:fcb663e92663 | 312:429900ca25ee |
---|---|
40 | 40 |
41 typedef ngx_uint_t (*ngx_hash_key_pt) (u_char *data, size_t len); | 41 typedef ngx_uint_t (*ngx_hash_key_pt) (u_char *data, size_t len); |
42 | 42 |
43 | 43 |
44 typedef struct { | 44 typedef struct { |
45 ngx_hash_t hash; | |
46 ngx_hash_wildcard_t *wc_head; | |
47 ngx_hash_wildcard_t *wc_tail; | |
48 } ngx_hash_combined_t; | |
49 | |
50 | |
51 typedef struct { | |
45 ngx_hash_t *hash; | 52 ngx_hash_t *hash; |
46 ngx_hash_key_pt key; | 53 ngx_hash_key_pt key; |
47 | 54 |
48 ngx_uint_t max_size; | 55 ngx_uint_t max_size; |
49 ngx_uint_t bucket_size; | 56 ngx_uint_t bucket_size; |
71 ngx_pool_t *temp_pool; | 78 ngx_pool_t *temp_pool; |
72 | 79 |
73 ngx_array_t keys; | 80 ngx_array_t keys; |
74 ngx_array_t *keys_hash; | 81 ngx_array_t *keys_hash; |
75 | 82 |
76 ngx_array_t dns_wildcards; | 83 ngx_array_t dns_wc_head; |
77 ngx_array_t *dns_wildcards_hash; | 84 ngx_array_t *dns_wc_head_hash; |
85 | |
86 ngx_array_t dns_wc_tail; | |
87 ngx_array_t *dns_wc_tail_hash; | |
78 } ngx_hash_keys_arrays_t; | 88 } ngx_hash_keys_arrays_t; |
79 | 89 |
80 | 90 |
81 typedef struct { | 91 typedef struct { |
82 ngx_uint_t hash; | 92 ngx_uint_t hash; |
85 u_char *lowcase_key; | 95 u_char *lowcase_key; |
86 } ngx_table_elt_t; | 96 } ngx_table_elt_t; |
87 | 97 |
88 | 98 |
89 void *ngx_hash_find(ngx_hash_t *hash, ngx_uint_t key, u_char *name, size_t len); | 99 void *ngx_hash_find(ngx_hash_t *hash, ngx_uint_t key, u_char *name, size_t len); |
90 void *ngx_hash_find_wildcard(ngx_hash_wildcard_t *hwc, u_char *name, | 100 void *ngx_hash_find_wc_head(ngx_hash_wildcard_t *hwc, u_char *name, size_t len); |
91 size_t len); | 101 void *ngx_hash_find_wc_tail(ngx_hash_wildcard_t *hwc, u_char *name, size_t len); |
102 void *ngx_hash_find_combined(ngx_hash_combined_t *hash, ngx_uint_t key, | |
103 u_char *name, size_t len); | |
92 | 104 |
93 ngx_int_t ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, | 105 ngx_int_t ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, |
94 ngx_uint_t nelts); | 106 ngx_uint_t nelts); |
95 ngx_int_t ngx_hash_wildcard_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, | 107 ngx_int_t ngx_hash_wildcard_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, |
96 ngx_uint_t nelts); | 108 ngx_uint_t nelts); |