aboutsummaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-11 03:27:17 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-11 03:29:52 +0200
commitb987b2cc645c0b56ae0dd98b043ded476dcbdd1c (patch)
tree0d6f49af6c8fe5b5e6e59f5d190eb25ad8a67c40 /common.c
parent30252e069d49b83033a7faf006b3b82dd1815ab1 (diff)
downloadxK-b987b2cc645c0b56ae0dd98b043ded476dcbdd1c.tar.gz
xK-b987b2cc645c0b56ae0dd98b043ded476dcbdd1c.tar.xz
xK-b987b2cc645c0b56ae0dd98b043ded476dcbdd1c.zip
degesch: add config_item_string_from_cstr()
Diffstat (limited to 'common.c')
-rw-r--r--common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.c b/common.c
index 2020032..8f35896 100644
--- a/common.c
+++ b/common.c
@@ -1138,6 +1138,17 @@ config_item_string (const struct str *s)
}
static struct config_item_ *
+config_item_string_from_cstr (const char *s)
+{
+ struct str tmp;
+ str_init (&tmp);
+ str_append (&tmp, s);
+ struct config_item_ *self = config_item_string (&tmp);
+ str_free (&tmp);
+ return self;
+}
+
+static struct config_item_ *
config_item_string_array (const struct str *s)
{
struct config_item_ *self = config_item_string (s);