diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
commit | 05b1a8f1e3595beab4397e25c2a6db9d832a6a97 (patch) | |
tree | 282923e87cbaf9d634dab4a7c69ce85d602effcf /src/core/ngx_string.h | |
parent | 328df7a5cc91180fef3b1b58129e14bc79bef80b (diff) | |
download | nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.gz nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.zip |
ngx_str_set() and ngx_str_null()
Diffstat (limited to 'src/core/ngx_string.h')
-rw-r--r-- | src/core/ngx_string.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h index b29bdda3d..53b942297 100644 --- 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) |