From c553750e32d1bf669a3e8308fa44319954a627ca Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 20 Jun 2019 15:55:59 -0400 Subject: Move responsibility for config var macros The testing-only parts now live in a conftesting.h; the shared parts of the macros live in confmacros.h --- src/app/config/statefile.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/app/config/statefile.c') diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c index 331592c3a6..e0584c62af 100644 --- a/src/app/config/statefile.c +++ b/src/app/config/statefile.c @@ -70,14 +70,9 @@ static config_abbrev_t state_abbrevs_[] = { * members with CONF_CHECK_VAR_TYPE. */ DUMMY_TYPECHECK_INSTANCE(or_state_t); -/*XXXX these next two are duplicates or near-duplicates from config.c */ #define VAR(varname,conftype,member,initvalue) \ - { { .name = varname, \ - .type = CONFIG_TYPE_ ## conftype, \ - .offset = offsetof(or_state_t, member), }, \ - initvalue CONF_TEST_MEMBERS(or_state_t, conftype, member) } -/** As VAR, but the option name and member name are the same. */ -#define V(member,conftype,initvalue) \ + CONFIG_VAR_ETYPE(or_state_t, varname, conftype, member, initvalue) +#define V(member,conftype,initvalue) \ VAR(#member, conftype, member, initvalue) /** Array of "state" variables saved to the ~/.tor/state file. */ -- cgit v1.2.3-54-g00ecf