From: Olivier Matz Date: Mon, 17 Jul 2017 19:49:37 +0000 (+0200) Subject: save X-Git-Url: http://git.droids-corp.org/?p=protos%2Flibecoli.git;a=commitdiff_plain;h=fe5f0c1af83b226d49b16ce882280e1c36d13789 save --- diff --git a/lib/ecoli_node_many.c b/lib/ecoli_node_many.c index f0843b1..c07ae5e 100644 --- a/lib/ecoli_node_many.c +++ b/lib/ecoli_node_many.c @@ -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"); diff --git a/lib/ecoli_node_weakref.c b/lib/ecoli_node_weakref.c index b496fcc..063ae4d 100644 --- a/lib/ecoli_node_weakref.c +++ b/lib/ecoli_node_weakref.c @@ -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; } diff --git a/lib/ecoli_node_weakref.h b/lib/ecoli_node_weakref.h index c29799f..1b6cace 100644 --- a/lib/ecoli_node_weakref.h +++ b/lib/ecoli_node_weakref.h @@ -25,13 +25,13 @@ * 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 -/* 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);