save
[protos/libecoli.git] / lib / ecoli_node_weakref.c
index b496fcc..eacec4c 100644 (file)
@@ -43,6 +43,8 @@
 #include <ecoli_node_option.h>
 #include <ecoli_node_weakref.h>
 
+EC_LOG_TYPE_REGISTER(node_weakref);
+
 struct ec_node_weakref {
        struct ec_node gen;
        struct ec_node *child;
@@ -58,13 +60,15 @@ ec_node_weakref_parse(const struct ec_node *gen_node,
        return ec_node_parse_child(node->child, state, strvec);
 }
 
-static struct ec_completed *
+static int
 ec_node_weakref_complete(const struct ec_node *gen_node,
+                       struct ec_completed *completed,
+                       struct ec_parsed *parsed,
                        const struct ec_strvec *strvec)
 {
        struct ec_node_weakref *node = (struct ec_node_weakref *)gen_node;
 
-       return ec_node_complete_strvec(node->child, strvec);
+       return ec_node_complete_child(node->child, completed, parsed, strvec);
 }
 
 static struct ec_node_type ec_node_weakref_type = {
@@ -92,7 +96,8 @@ int ec_node_weakref_set(struct ec_node *gen_node, struct ec_node *child)
        node->child = child;
 
        child->parent = gen_node;
-       TAILQ_INSERT_TAIL(&gen_node->children, child, next); // XXX really needed?
+       // XXX else it breaks the dump()
+       //TAILQ_INSERT_TAIL(&gen_node->children, child, next); // XXX really needed?
 
        return 0;
 }
@@ -113,10 +118,13 @@ struct ec_node *ec_node_weakref(const char *id, struct ec_node *child)
        return gen_node;
 }
 
+/* LCOV_EXCL_START */
 static int ec_node_weakref_testcase(void)
 {
+       //XXX weakref testcase
        return 0;
 }
+/* LCOV_EXCL_STOP */
 
 static struct ec_test ec_node_weakref_test = {
        .name = "node_weakref",