Mercurial > hg > nginx
diff src/core/ngx_string.h @ 3516:dd1570b6f237
ngx_str_set() and ngx_str_null()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 14 May 2010 09:56:37 +0000 |
parents | 098100f5f54b |
children | 6802ba529ec4 |
line wrap: on
line diff
--- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -38,6 +38,9 @@ typedef struct { #define ngx_string(str) { sizeof(str) - 1, (u_char *) str } #define ngx_null_string { 0, NULL } +#define ngx_str_set(str, text) \ + (str)->len = sizeof(text) - 1; (str)->data = (u_char *) text +#define ngx_str_null(str) (str)->len = 0; (str)->data = NULL #define ngx_tolower(c) (u_char) ((c >= 'A' && c <= 'Z') ? (c | 0x20) : c)