From cc6032956fd4d7b0dbb471b47e0c5bbaea558a7b Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Tue, 19 Jul 2011 19:11:24 +0000 Subject: [PATCH] Add an API to config.h for creating values in the config_tree mempool. --- lib/config/config.c | 6 ++++++ lib/config/config.h | 1 + 2 files changed, 7 insertions(+) diff --git a/lib/config/config.c b/lib/config/config.c index 37dbfc7fc..97c880f5e 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -1419,6 +1419,12 @@ struct config_node *create_config_node(struct config_tree *cft, const char *key) return cn; } +struct config_value *create_config_value(struct config_tree *cft) +{ + struct cs *c = (struct cs *) cft; + return _create_value(c->mem); +} + struct dm_pool *config_tree_memory(struct config_tree *cft) { struct cs *c = (struct cs *) cft; diff --git a/lib/config/config.h b/lib/config/config.h index c34d6e6ac..acdc47a19 100644 --- a/lib/config/config.h +++ b/lib/config/config.h @@ -124,6 +124,7 @@ struct config_node *clone_config_node_with_mem(struct dm_pool *mem, const struct config_node *node, int siblings); struct config_node *create_config_node(struct config_tree *cft, const char *key); +struct config_value *create_config_value(struct config_tree *cft); struct config_node *clone_config_node(struct config_tree *cft, const struct config_node *cn, int siblings);