diff options
author | Max Kellermann <max@duempel.org> | 2009-01-18 19:37:27 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-18 19:37:27 +0100 |
commit | a531a1e65075d27574bc31d4bac7ab20cb750efd (patch) | |
tree | f06ad8e7359f0845d94d2b8a6f655a0cceb744c2 /src/conf.h | |
parent | 73e466cfef6497aff840cfac35d80d74e7b0fd0c (diff) | |
download | mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.tar.gz mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.tar.xz mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.zip |
conf: added config_get_block_string()
This replaces lots of getBlockParam() invocations.
Diffstat (limited to 'src/conf.h')
-rw-r--r-- | src/conf.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conf.h b/src/conf.h index dda328ba9..3026c9579 100644 --- a/src/conf.h +++ b/src/conf.h @@ -114,6 +114,17 @@ getBlockParam(struct config_param *param, const char *name); bool config_get_bool(const char *name, bool default_value); +const char * +config_get_block_string(struct config_param *param, const char *name, + const char *default_value); + +static inline char * +config_dup_block_string(struct config_param *param, const char *name, + const char *default_value) +{ + return g_strdup(config_get_block_string(param, name, default_value)); +} + bool config_get_block_bool(struct config_param *param, const char *name, bool default_value); |