From 1b3b6d9f2d94e659375257a5c439d250ce0075fd Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 5 Sep 2019 11:48:44 -0400 Subject: Replace low-level {var_type,struct_var}_is_*() with flag inspection 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!) --- src/lib/confmgt/structvar.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/confmgt/structvar.h') diff --git a/src/lib/confmgt/structvar.h b/src/lib/confmgt/structvar.h index e6dbc6d6ec..201211f795 100644 --- a/src/lib/confmgt/structvar.h +++ b/src/lib/confmgt/structvar.h @@ -17,6 +17,7 @@ struct struct_member_t; struct config_line_t; #include +#include "lib/cc/torint.h" void struct_set_magic(void *object, const struct struct_magic_decl_t *decl); @@ -45,9 +46,7 @@ void struct_var_mark_fragile(void *object, const char *struct_var_get_name(const struct struct_member_t *member); const char *struct_var_get_typename(const struct struct_member_t *member); -bool struct_var_is_cumulative(const struct struct_member_t *member); -bool struct_var_is_settable(const struct struct_member_t *member); -bool struct_var_is_contained(const struct struct_member_t *member); +uint32_t struct_var_get_flags(const struct struct_member_t *member); int struct_var_kvassign(void *object, const struct config_line_t *line, char **errmsg, -- cgit v1.2.3-54-g00ecf