aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfigData.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-30 22:00:32 +0100
committerMax Kellermann <max@duempel.org>2013-01-30 22:20:14 +0100
commitd9ea3082fb608935c72620e272f4b3e74b2c3a44 (patch)
tree5353513725721f49c0296520b0f55f760dacf8a5 /src/ConfigData.hxx
parent2d63c26936b2b9acfb8f2f81a109e4aff0b26fe7 (diff)
downloadmpd-d9ea3082fb608935c72620e272f4b3e74b2c3a44.tar.gz
mpd-d9ea3082fb608935c72620e272f4b3e74b2c3a44.tar.xz
mpd-d9ea3082fb608935c72620e272f4b3e74b2c3a44.zip
ConfigData: add constructors/destructors
Diffstat (limited to '')
-rw-r--r--src/ConfigData.hxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ConfigData.hxx b/src/ConfigData.hxx
index b71c0a9e4..36e3ea332 100644
--- a/src/ConfigData.hxx
+++ b/src/ConfigData.hxx
@@ -45,6 +45,10 @@ struct block_param {
* this option yet.
*/
mutable bool used;
+
+ gcc_nonnull_all
+ block_param(const char *_name, const char *_value, int _line=-1)
+ :name(_name), value(_value), line(_line), used(false) {}
};
#endif
@@ -61,6 +65,11 @@ struct config_param {
* this option yet.
*/
bool used;
+
+ config_param(int _line=-1)
+ :value(nullptr), line(_line), used(false) {}
+ config_param(const char *_value, int _line=-1);
+ ~config_param();
#endif
};
@@ -76,13 +85,6 @@ struct ConfigData {
extern "C" {
#endif
-gcc_malloc
-struct config_param *
-config_new_param(const char *value, int line);
-
-void
-config_param_free(struct config_param *param);
-
void
config_add_block_param(struct config_param * param, const char *name,
const char *value, int line);