save
authorOlivier Matz <zer0@droids-corp.org>
Mon, 17 Jul 2017 19:49:37 +0000 (21:49 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Mon, 17 Jul 2017 19:49:37 +0000 (21:49 +0200)
lib/ecoli_node_many.c
lib/ecoli_node_weakref.c
lib/ecoli_node_weakref.h

index f0843b1..c07ae5e 100644 (file)
@@ -205,6 +205,7 @@ static int ec_node_many_testcase(void)
                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");
index b496fcc..063ae4d 100644 (file)
@@ -115,6 +115,7 @@ struct ec_node *ec_node_weakref(const char *id, struct ec_node *child)
 
 static int ec_node_weakref_testcase(void)
 {
+       //XXX weakref testcase
        return 0;
 }
 
index c29799f..1b6cace 100644 (file)
  * 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
@@ -83,8 +83,6 @@
 /* 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);