From 5d0f586d56da625bc7bcc3ad6d4e3445eeac0fa3 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 23 Mar 2023 21:14:08 +0000 Subject: 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 Signed-off-by: Andrew Clayton --- src/nxt_conf.h | 1 + 1 file changed, 1 insertion(+) 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, -- cgit