diff src/core/ngx_conf_file.h @ 383:c05876036128

nginx-0.0.7-2004-07-08-19:17:47 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 08 Jul 2004 15:17:47 +0000
parents 2e3cbc1bbe3c
children d6e2b445c1b8
line wrap: on
line diff
--- 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
     }
 
 #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
         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;               \