ConfigFile: add enum ConfigOption

Look up top-level config options by enum (= integer), not by name
string.
This commit is contained in:
Max Kellermann
2013-01-30 17:52:51 +01:00
parent daa4647712
commit 595b6a4f6c
16 changed files with 278 additions and 197 deletions

View File

@@ -81,11 +81,11 @@ filter_plugin_by_name(G_GNUC_UNUSED const char *name)
}
static const struct config_param *
find_named_config_block(const char *block, const char *name)
find_named_config_block(ConfigOption option, const char *name)
{
const struct config_param *param = NULL;
while ((param = config_get_next_param(block, param)) != NULL) {
while ((param = config_get_next_param(option, param)) != NULL) {
const char *current_name =
config_get_block_string(param, "name", NULL);
if (current_name != NULL && strcmp(current_name, name) == 0)