git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use helper in cmd node
[protos/libecoli.git]
/
lib
/
ecoli_node_sh_lex.c
diff --git
a/lib/ecoli_node_sh_lex.c
b/lib/ecoli_node_sh_lex.c
index
b39ce21
..
a632f97
100644
(file)
--- a/
lib/ecoli_node_sh_lex.c
+++ b/
lib/ecoli_node_sh_lex.c
@@
-353,15
+353,18
@@
ec_node_sh_lex_get_children_count(const struct ec_node *gen_node)
return 0;
}
return 0;
}
-static struct ec_node *
-ec_node_sh_lex_get_child(const struct ec_node *gen_node, size_t i)
+static int
+ec_node_sh_lex_get_child(const struct ec_node *gen_node, size_t i,
+ struct ec_node **child, unsigned int *refs)
{
struct ec_node_sh_lex *node = (struct ec_node_sh_lex *)gen_node;
if (i >= 1)
{
struct ec_node_sh_lex *node = (struct ec_node_sh_lex *)gen_node;
if (i >= 1)
- return
NULL
;
+ return
-1
;
- return node->child;
+ *refs = 1;
+ *child = node->child;
+ return 0;
}
static struct ec_node_type ec_node_sh_lex_type = {
}
static struct ec_node_type ec_node_sh_lex_type = {