aboutsummaryrefslogtreecommitdiff
path: root/src/lib/confmgt/structvar.c
AgeCommit message (Collapse)Author
2019-12-16Fix formatting in tor_assertf() message in struct_check_magic().Nick Mathewson
Closes 32771; bugfix on 0.4.2.1-alpha.
2019-09-11Merge branch 'tor-github/pr/1296'David Goulet
2019-09-11Replace low-level {var_type,struct_var}_is_*() with flag inspectionNick Mathewson
Since the flags are now stored with compatible numbering, we can just OR them together and see whether the flag we want is in the result. (Net code removal!)
2019-09-11struct_var: refactor struct_var_is*() functions to delegateNick Mathewson
Previously they checked the individual flags inside var_type_def_t; now they call the appropriate var_type_is_*() functions. (These functions will be removed entirely by the end of this branch.)
2019-09-05Remove unused struct_var_* functions.Nick Mathewson
These turned out to be unnecessary, so let's not keep them around and let them start getting complicated. Closes ticket 31630.
2019-09-04Remove _ex suffix from typed_var_*_ex() functions.Nick Mathewson
Now that the variants of these functions that took config_line_t are gone, there is no longer any reason for the remaining variants to have "ex" at the end of their names. This commit was made by running this perl script over all the files in src/: #!/usr/bin/perl -w -i -p s{typed_var_(assign|free|encode|copy|eq|ok|kvassign|kvencode|mark_fragile)_ex} {typed_var_$1}g;
2019-06-25Turn several properties of types or variables into flags.Nick Mathewson
"unsettable" is a property of types. LINELIST_V and OBSOLETE are unsettable, meaning that they cannot be set by name. "contained" is a property of types. I'm hoping to find a better name here. LINELIST_S is "contained" because it always appears within a LINELIST_V, and as such doesn't need to be dumped ore copied independently. "cumulative" is a property of types. Cumulative types can appear more than once in a torrc without causing a warning, because they add to each other rather than replacing each other. "obsolete" is a property of variables. "marking fragile" is now a command that struct members can accept. With these changes, confparse and config no longer ever need to mention CONFIG_TYPE_XYZ values by name.
2019-06-25Use structvar to find the types for config vars.Nick Mathewson
2019-06-25Add new "struct_var_" functions to manipulate struct fields.Nick Mathewson
These functions exist one level higher than typed_var_t. They describe a type, a name, and an offset within a structure.