summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-26 17:46:16 -0400
committerNick Mathewson <nickm@torproject.org>2019-11-07 07:28:43 -0500
commit19cac400d9cf7dcc274c583bb3e942b2682c3663 (patch)
tree1737611f3262a3a1f759a0fe3a3afb250e4455ef /src/feature
parent4541a590192a97d56c7a303492a2bc1bbeacb441 (diff)
downloadtor-19cac400d9cf7dcc274c583bb3e942b2682c3663.tar.gz
tor-19cac400d9cf7dcc274c583bb3e942b2682c3663.zip
Macros for declaring configuration structs and variable-tables
In our old design, we had to declare configuration structures (like or_options_t) and variable tables (like option_vars_) separately, and we used some magic to enforce their consistency (see conftesting.h). With this design, we write a single definition for the configuration object and its fields, and use C macros to expand it either into a structure, or a variable table. Since they are both made from the same source, they can't become inconsistent. The two designs can coexist happily, and we can migrate from one to the other at our convenience.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/nodelist/routerset.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/feature/nodelist/routerset.h b/src/feature/nodelist/routerset.h
index dc6ce0b667..6bd97f9422 100644
--- a/src/feature/nodelist/routerset.h
+++ b/src/feature/nodelist/routerset.h
@@ -46,6 +46,7 @@ int routerset_len(const routerset_t *set);
struct var_type_def_t;
extern const struct var_type_def_t ROUTERSET_type_defn;
+typedef routerset_t config_decl_ROUTERSET;
#ifdef ROUTERSET_PRIVATE
#include "lib/container/bitarray.h"