ec_log(EC_LOG_ERR, "cannot create node\n");
return -1;
}
+ ret |= EC_TEST_CHECK_PARSE(node, 0);
ret |= EC_TEST_CHECK_PARSE(node, 0, "bar");
ret |= EC_TEST_CHECK_PARSE(node, 1, "foo", "bar");
ret |= EC_TEST_CHECK_PARSE(node, 2, "foo", "foo", "bar");
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ECOLI_NODE_BYPASS_
-#define ECOLI_NODE_BYPASS_
+#ifndef ECOLI_NODE_WEAKREF_
+#define ECOLI_NODE_WEAKREF_
#include <ecoli_node.h>
-/* a node that just behaves like its child and that does not free
- * its child when freed.
+/* A node that just behaves like its child and that does not free
+ * its child when freed. **The child has to be freed manually**.
*
* useful to create cyclic graphs of nodes:
* creating a loop (with clones) result in something that is not
/* on error, child is *not* freed */
struct ec_node *ec_node_weakref(const char *id, struct ec_node *child);
-struct ec_node *ec_node_weakref_empty(const char *id);
-
/* on error, child is *not* freed */
int ec_node_weakref_set(struct ec_node *node, struct ec_node *child);