1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
5 #ifndef ECOLI_NODE_SUBSET_
6 #define ECOLI_NODE_SUBSET_
8 #include <ecoli_node.h>
10 #define EC_NODE_SUBSET(args...) __ec_node_subset(args, EC_NODE_ENDLIST)
12 /* list must be terminated with EC_NODE_ENDLIST */
13 /* all nodes given in the list will be freed when freeing this one */
14 /* avoid using this function directly, prefer the macro EC_NODE_SUBSET() or
15 * ec_node_subset() + ec_node_subset_add() */
16 struct ec_node *__ec_node_subset(const char *id, ...);
18 struct ec_node *ec_node_subset(const char *id);
20 /* child is consumed */
21 int ec_node_subset_add(struct ec_node *node, struct ec_node *child);