degesch: finish /set
One bug remaining to make it work.
This commit is contained in:
14
common.c
14
common.c
@@ -1385,6 +1385,20 @@ end:
|
||||
return object;
|
||||
}
|
||||
|
||||
/// Clone an item. Schema assignments aren't retained.
|
||||
struct config_item_ *
|
||||
config_item_clone (struct config_item_ *self)
|
||||
{
|
||||
// Oh well, it saves code
|
||||
struct str tmp;
|
||||
str_init (&tmp);
|
||||
config_item_write (self, false, &tmp);
|
||||
struct config_item_ *result =
|
||||
config_item_parse (tmp.str, tmp.len, true, NULL);
|
||||
str_free (&tmp);
|
||||
return result;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// XXX: this thing is ugly in concept
|
||||
|
||||
Reference in New Issue
Block a user