save
[protos/libecoli.git] / lib / ecoli_node_weakref.c
index 7370962..735f831 100644 (file)
@@ -37,6 +37,8 @@
 #include <ecoli_test.h>
 #include <ecoli_strvec.h>
 #include <ecoli_node.h>
+#include <ecoli_parsed.h>
+#include <ecoli_completed.h>
 #include <ecoli_node_str.h>
 #include <ecoli_node_option.h>
 #include <ecoli_node_weakref.h>
@@ -46,20 +48,24 @@ struct ec_node_weakref {
        struct ec_node *child;
 };
 
-static struct ec_parsed *ec_node_weakref_parse(const struct ec_node *gen_node,
-       const struct ec_strvec *strvec)
+static int
+ec_node_weakref_parse(const struct ec_node *gen_node,
+               struct ec_parsed *state,
+               const struct ec_strvec *strvec)
 {
        struct ec_node_weakref *node = (struct ec_node_weakref *)gen_node;
 
-       return ec_node_parse_strvec(node->child, strvec);
+       return ec_node_parse_child(node->child, state, strvec);
 }
 
-static struct ec_completed *ec_node_weakref_complete(const struct ec_node *gen_node,
-       const struct ec_strvec *strvec)
+static struct ec_completed *
+ec_node_weakref_complete(const struct ec_node *gen_node,
+                       struct ec_parsed *state,
+                       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, state, strvec);
 }
 
 static struct ec_node_type ec_node_weakref_type = {
@@ -99,7 +105,7 @@ struct ec_node *ec_node_weakref(const char *id, struct ec_node *child)
        if (child == NULL)
                return NULL;
 
-       gen_node = __ec_node_new(&ec_node_weakref_type, id);
+       gen_node = __ec_node(&ec_node_weakref_type, id);
        if (gen_node == NULL)
                return NULL;
 
@@ -108,10 +114,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",