summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-20 15:21:21 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-25 12:51:25 -0400
commit4d101b39d74fb467d7fb4ad8ddb27e07c3074a69 (patch)
tree1bcae00d2ae210cb66607af2d1de2a0460607cb7 /src/lib
parente8790971f6120cc3e4fd2acd41f5dd0512f52068 (diff)
downloadtor-4d101b39d74fb467d7fb4ad8ddb27e07c3074a69.tar.gz
tor-4d101b39d74fb467d7fb4ad8ddb27e07c3074a69.zip
Move config_var_t info conftypes.h
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/conf/conftypes.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index cddfeff2fd..5f13ec3de2 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -136,4 +136,17 @@ typedef union {
} confparse_dummy_values_t;
#endif /* defined(TOR_UNIT_TESTS) */
+/** A variable allowed in the configuration file or on the command line. */
+typedef struct config_var_t {
+ struct_member_t member; /** A struct member corresponding to this
+ * variable. */
+ const char *initvalue; /**< String (or null) describing initial value. */
+
+#ifdef TOR_UNIT_TESTS
+ /** Used for compiler-magic to typecheck the corresponding field in the
+ * corresponding struct. Only used in unit test mode, at compile-time. */
+ confparse_dummy_values_t var_ptr_dummy;
+#endif
+} config_var_t;
+
#endif /* !defined(TOR_SRC_LIB_CONF_CONFTYPES_H) */