diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-06-20 16:07:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-06-25 12:51:25 -0400 |
commit | 5b252d31ede521bea53c690693a2ab3d74c8fef4 (patch) | |
tree | d94bb5170b846c5732d8defb9be8dae3d9bac012 /src/test/test_confparse.c | |
parent | c553750e32d1bf669a3e8308fa44319954a627ca (diff) | |
download | tor-5b252d31ede521bea53c690693a2ab3d74c8fef4.tar.gz tor-5b252d31ede521bea53c690693a2ab3d74c8fef4.zip |
Add a "flags" member to config_var_t
Additionally, adjust the macros so that we can add new members like
this more easily.
Diffstat (limited to 'src/test/test_confparse.c')
-rw-r--r-- | src/test/test_confparse.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/test/test_confparse.c b/src/test/test_confparse.c index 2f408b5b6e..4bf66f3230 100644 --- a/src/test/test_confparse.c +++ b/src/test/test_confparse.c @@ -52,9 +52,8 @@ static test_struct_t test_struct_t_dummy; CONFIG_VAR_ETYPE(test_struct_t, varname, conftype, member, initvalue) #define V(member,conftype,initvalue) \ VAR(#member, conftype, member, initvalue) - -#define OBSOLETE(varname) \ - { { .name=varname, .type=CONFIG_TYPE_OBSOLETE }, NULL, {.INT=NULL} } +#define OBSOLETE(varname) \ + CONFIG_VAR_OBSOLETE(varname) static config_var_t test_vars[] = { V(s, STRING, "hello"), @@ -78,12 +77,11 @@ static config_var_t test_vars[] = { VAR("LineTypeB", LINELIST_S, mixed_lines, NULL), OBSOLETE("obsolete"), { - { .name = "routerset", - .type = CONFIG_TYPE_EXTENDED, - .type_def = &ROUTERSET_type_defn, - .offset = offsetof(test_struct_t, routerset), - }, - NULL, {.INT=NULL} + .member = { .name = "routerset", + .type = CONFIG_TYPE_EXTENDED, + .type_def = &ROUTERSET_type_defn, + .offset = offsetof(test_struct_t, routerset), + }, }, VAR("__HiddenInt", POSINT, hidden_int, "0"), VAR("MixedHiddenLines", LINELIST_V, mixed_hidden_lines, NULL), |