degesch: add config_item_string_from_cstr()
This commit is contained in:
11
common.c
11
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user