diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-06-20 16:26:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-06-25 12:51:25 -0400 |
commit | b6457d4c08f601c4e42e64aad47ac9c30c36306e (patch) | |
tree | e55ee7afd31ae73116e33d132618474012483333 /src/lib/conf | |
parent | 5b252d31ede521bea53c690693a2ab3d74c8fef4 (diff) | |
download | tor-b6457d4c08f601c4e42e64aad47ac9c30c36306e.tar.gz tor-b6457d4c08f601c4e42e64aad47ac9c30c36306e.zip |
Extend macros to allow flag arguments.
Diffstat (limited to 'src/lib/conf')
-rw-r--r-- | src/lib/conf/confmacros.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/conf/confmacros.h b/src/lib/conf/confmacros.h index 4242137c5a..ff284e681d 100644 --- a/src/lib/conf/confmacros.h +++ b/src/lib/conf/confmacros.h @@ -30,12 +30,14 @@ * Most modules that use this macro should wrap it in a local macro that * sets structtype to the local configuration type. **/ -#define CONFIG_VAR_ETYPE(structtype, varname, vartype, membername, initval) \ +#define CONFIG_VAR_ETYPE(structtype, varname, vartype, membername, \ + varflags, initval) \ { .member = \ { .name = varname, \ .type = CONFIG_TYPE_ ## vartype, \ .offset = offsetof(structtype, membername), \ }, \ + .flags = varflags, \ .initvalue = initval \ CONF_TEST_MEMBERS(structtype, vartype, membername) \ } @@ -44,13 +46,15 @@ * As CONFIG_VAR_XTYPE, but declares a value using an extension type whose * type definition is <b>vartype</b>_type_defn. **/ -#define CONFIG_VAR_DEFN(structtype, varname, vartype, membername, initval) \ +#define CONFIG_VAR_DEFN(structtype, varname, vartype, membername, \ + varflags, initval) \ { .member = \ - { .name = varname, \ + { .name = varname, \ .type = CONFIG_TYPE_EXTENDED, \ .type_def = &vartype ## _type_defn, \ .offset = offsetof(structtype, membername), \ }, \ + .flags = varflags, \ .initvalue = initval \ CONF_TEST_MEMBERS(structtype, vartype, membername) \ } |