comparison src/core/ngx_string.h @ 582:c456a023113c NGINX_0_8_43

nginx 0.8.43 *) Feature: large geo ranges base loading speed-up. *) Bugfix: an error_page redirection to "location /zero { return 204; }" without changing status code kept the error body; the bug had appeared in 0.8.42. *) Bugfix: nginx might close IPv6 listen socket during reconfiguration. Thanks to Maxim Dounin. *) Bugfix: the $uid_set variable may be used at any request processing stage.
author Igor Sysoev <http://sysoev.ru>
date Wed, 30 Jun 2010 00:00:00 +0400
parents 8246d8a2c2be
children 6c96fdd2dfc3
comparison
equal deleted inserted replaced
581:22b2345b75d9 582:c456a023113c
87 87
88 88
89 #if (NGX_MEMCPY_LIMIT) 89 #if (NGX_MEMCPY_LIMIT)
90 90
91 void *ngx_memcpy(void *dst, void *src, size_t n); 91 void *ngx_memcpy(void *dst, void *src, size_t n);
92 #define ngx_cpymem(dst, src, n) ((u_char *) ngx_memcpy(dst, src, n)) + (n) 92 #define ngx_cpymem(dst, src, n) (((u_char *) ngx_memcpy(dst, src, n)) + (n))
93 93
94 #else 94 #else
95 95
96 /* 96 /*
97 * gcc3, msvc, and icc7 compile memcpy() to the inline "rep movs". 97 * gcc3, msvc, and icc7 compile memcpy() to the inline "rep movs".
98 * gcc3 compiles memcpy(d, s, 4) to the inline "mov"es. 98 * gcc3 compiles memcpy(d, s, 4) to the inline "mov"es.
99 * icc8 compile memcpy(d, s, 4) to the inline "mov"es or XMM moves. 99 * icc8 compile memcpy(d, s, 4) to the inline "mov"es or XMM moves.
100 */ 100 */
101 #define ngx_memcpy(dst, src, n) (void) memcpy(dst, src, n) 101 #define ngx_memcpy(dst, src, n) (void) memcpy(dst, src, n)
102 #define ngx_cpymem(dst, src, n) ((u_char *) memcpy(dst, src, n)) + (n) 102 #define ngx_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
103 103
104 #endif 104 #endif
105 105
106 106
107 #if ( __INTEL_COMPILER >= 800 ) 107 #if ( __INTEL_COMPILER >= 800 )
198 ngx_uint_t type); 198 ngx_uint_t type);
199 void ngx_unescape_uri(u_char **dst, u_char **src, size_t size, ngx_uint_t type); 199 void ngx_unescape_uri(u_char **dst, u_char **src, size_t size, ngx_uint_t type);
200 uintptr_t ngx_escape_html(u_char *dst, u_char *src, size_t size); 200 uintptr_t ngx_escape_html(u_char *dst, u_char *src, size_t size);
201 201
202 202
203 typedef struct {
204 ngx_rbtree_node_t node;
205 ngx_str_t str;
206 } ngx_str_node_t;
207
208
209 void ngx_str_rbtree_insert_value(ngx_rbtree_node_t *temp,
210 ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel);
211 ngx_str_node_t *ngx_str_rbtree_lookup(ngx_rbtree_t *rbtree, ngx_str_t *name,
212 uint32_t hash);
213
203 214
204 void ngx_sort(void *base, size_t n, size_t size, 215 void ngx_sort(void *base, size_t n, size_t size,
205 ngx_int_t (*cmp)(const void *, const void *)); 216 ngx_int_t (*cmp)(const void *, const void *));
206 #define ngx_qsort qsort 217 #define ngx_qsort qsort
207 218