diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-07-08 19:17:47 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-07-08 19:17:47 +0400 |
commit | 755694565542b227c6966e8ba78425c84cf6e009 (patch) | |
tree | 22c2929c01be68df4e1b2057a704a0ec73a237e5 /src/core/ngx_conf_file.h | |
parent | 8e811c11b96bafca446404c6256d8edbb01900b0 (diff) |
nginx-0.0.7-2004-07-08-19:17:47 import
Diffstat (limited to 'src/core/ngx_conf_file.h')
-rw-r--r-- | src/core/ngx_conf_file.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h index ec61e94cf..c09ee552b 100644 --- a/src/core/ngx_conf_file.h +++ b/src/core/ngx_conf_file.h @@ -45,6 +45,7 @@ #define NGX_CONF_UNSET -1 #define NGX_CONF_UNSET_UINT (ngx_uint_t) -1 +#define NGX_CONF_UNSET_PTR (void *) -1 #define NGX_CONF_UNSET_SIZE (size_t) -1 #define NGX_CONF_UNSET_MSEC (ngx_msec_t) -1 @@ -181,7 +182,7 @@ char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data); } #define ngx_conf_init_ptr_value(conf, default) \ - if (conf == (void *) NGX_CONF_UNSET) { \ + if (conf == NGX_CONF_UNSET_PTR) { \ conf = default; \ } @@ -205,6 +206,11 @@ char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data); conf = (prev == NGX_CONF_UNSET) ? default : prev; \ } +#define ngx_conf_merge_ptr_value(conf, prev, default) \ + if (conf == NULL) { \ + conf = (prev == NULL) ? default : prev; \ + } + #define ngx_conf_merge_unsigned_value(conf, prev, default) \ if (conf == NGX_CONF_UNSET_UINT) { \ conf = (prev == NGX_CONF_UNSET_UINT) ? default : prev; \ |