From b987b2cc645c0b56ae0dd98b043ded476dcbdd1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Sat, 11 Jul 2015 03:27:17 +0200
Subject: degesch: add config_item_string_from_cstr()
---
common.c | 11 +++++++++++
1 file changed, 11 insertions(+)
(limited to 'common.c')
diff --git a/common.c b/common.c
index 2020032..8f35896 100644
--- a/common.c
+++ b/common.c
@@ -1137,6 +1137,17 @@ config_item_string (const struct str *s)
return self;
}
+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)
{
--
cgit v1.2.3