aboutsummaryrefslogtreecommitdiff
path: root/src/lib/conf/confmacros.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-21 09:58:40 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-25 12:51:25 -0400
commita7835202cf871f68854494df904058a6e644c0b0 (patch)
tree0da40c2c861d44374de01f58902e17a913326993 /src/lib/conf/confmacros.h
parentb6457d4c08f601c4e42e64aad47ac9c30c36306e (diff)
downloadtor-a7835202cf871f68854494df904058a6e644c0b0.tar.gz
tor-a7835202cf871f68854494df904058a6e644c0b0.zip
Turn several properties of types or variables into flags.
"unsettable" is a property of types. LINELIST_V and OBSOLETE are unsettable, meaning that they cannot be set by name. "contained" is a property of types. I'm hoping to find a better name here. LINELIST_S is "contained" because it always appears within a LINELIST_V, and as such doesn't need to be dumped ore copied independently. "cumulative" is a property of types. Cumulative types can appear more than once in a torrc without causing a warning, because they add to each other rather than replacing each other. "obsolete" is a property of variables. "marking fragile" is now a command that struct members can accept. With these changes, confparse and config no longer ever need to mention CONFIG_TYPE_XYZ values by name.
Diffstat (limited to 'src/lib/conf/confmacros.h')
-rw-r--r--src/lib/conf/confmacros.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/conf/confmacros.h b/src/lib/conf/confmacros.h
index ff284e681d..aa89965e69 100644
--- a/src/lib/conf/confmacros.h
+++ b/src/lib/conf/confmacros.h
@@ -60,6 +60,8 @@
}
#define CONFIG_VAR_OBSOLETE(varname) \
- { .member = { .name = varname, .type = CONFIG_TYPE_OBSOLETE } }
+ { .member = { .name = varname, .type = CONFIG_TYPE_OBSOLETE }, \
+ .flags = CVFLAG_OBSOLETE \
+ }
#endif /* !defined(TOR_LIB_CONF_CONFMACROS_H) */