1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
6 * @defgroup nodes Nodes
10 #ifndef ECOLI_NODE_SEQ_
11 #define ECOLI_NODE_SEQ_
13 #include <ecoli_node.h>
15 #define EC_NODE_SEQ(args...) __ec_node_seq(args, EC_NODE_ENDLIST)
17 /* list must be terminated with EC_NODE_ENDLIST */
18 /* all nodes given in the list will be freed when freeing this one */
19 /* avoid using this function directly, prefer the macro EC_NODE_SEQ() or
20 * ec_node_seq() + ec_node_seq_add() */
21 struct ec_node *__ec_node_seq(const char *id, ...);
23 struct ec_node *ec_node_seq(const char *id);
25 /* child is consumed */
26 int ec_node_seq_add(struct ec_node *node, struct ec_node *child);