diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2023-03-23 21:14:08 +0000 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2023-03-28 23:15:28 +0100 |
commit | 5d0f586d56da625bc7bcc3ad6d4e3445eeac0fa3 (patch) | |
tree | 6ab9e3fbce912d54e5496ba5bac234e5725df43a | |
parent | aa0009f8dcecfefd3c123baa316c2f86d3525f8c (diff) | |
download | unit-5d0f586d56da625bc7bcc3ad6d4e3445eeac0fa3.tar.gz unit-5d0f586d56da625bc7bcc3ad6d4e3445eeac0fa3.tar.bz2 |
Add NXT_CONF_MAP_BOOL.
When adding a boolean config option, this is of type
NXT_CONF_VALUE_BOOLEAN, however when mapping such an entry to a
structure member via nxt_conf_map_object() this is done as a
NXT_CONF_MAP_INT8. It took a bit of head scratching to find out that it
should have been a NXT_CONF_MAP_INT8 and not a NXT_CONF_MAP_INT.
Introduce a new map type of NXT_CONF_MAP_BOOL that will eventually
replace NXT_CONF_MAP_INT8 for representing booleans...
We use the short form _BOOL as that matches the naming convention of the
other types in nxt_conf_map_type_t.
This is part of a set of patches and eventually NXT_CONF_MAP_BOOL will
simply replace NXT_CONF_MAP_INT8.
Reviewed-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r-- | src/nxt_conf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_conf.h b/src/nxt_conf.h index 95b504ef..82bc2620 100644 --- a/src/nxt_conf.h +++ b/src/nxt_conf.h @@ -39,6 +39,7 @@ typedef struct { typedef enum { + NXT_CONF_MAP_BOOL, NXT_CONF_MAP_INT8, NXT_CONF_MAP_INT32, NXT_CONF_MAP_INT64, |