summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-06-23 18:43:23 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-06-23 18:43:23 +0100
commitaf9b338deefeba0d2dc8d80e55559fca18f4df67 (patch)
treeea15c8e3c433ba5efb32a03bf46c3c95d97144e2
parent98d25243aa053422307afab579ed59eb29f5b05f (diff)
downloadefl-af9b338deefeba0d2dc8d80e55559fca18f4df67.tar.gz
Revert "eolian: generalized node append"
This reverts commit 98d25243aa053422307afab579ed59eb29f5b05f. Reason: accidentally got into master... I'm tired.
-rw-r--r--src/lib/eolian/eo_lexer.h1
-rw-r--r--src/lib/eolian/eo_parser.c20
2 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index b8188b2545..11827a3633 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -52,7 +52,6 @@ typedef struct _Eo_Node
{
unsigned char type;
union {
- void *def;
Eo_Class_Def *def_class;
Eo_Type_Def *def_type;
};
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index d30ee08281..9dfdee0ea5 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -103,15 +103,6 @@ pop_strbuf(Eo_Lexer *ls)
ls->tmp.str_bufs = eina_list_remove_list(ls->tmp.str_bufs, ls->tmp.str_bufs);
}
-static void
-append_node(Eo_Lexer *ls, int type, void *def)
-{
- Eo_Node *nd = calloc(1, sizeof(Eo_Node));
- nd->type = type;
- nd->def = def;
- ls->nodes = eina_list_append(ls->nodes, nd);
-}
-
static Eina_Strbuf *
parse_name(Eo_Lexer *ls, Eina_Strbuf *buf)
{
@@ -861,6 +852,7 @@ parse_class(Eo_Lexer *ls, Eina_Bool allow_ctors, Eolian_Class_Type type)
static void
parse_unit(Eo_Lexer *ls)
{
+ Eo_Node *nd;
switch (ls->t.kw)
{
case KW_abstract:
@@ -878,7 +870,10 @@ parse_unit(Eo_Lexer *ls)
case KW_type:
{
parse_typedef(ls);
- append_node(ls, NODE_TYPEDEF, ls->tmp.type_def);
+ nd = calloc(1, sizeof(Eo_Node));
+ nd->type = NODE_TYPEDEF;
+ nd->def_type = ls->tmp.type_def;
+ ls->nodes = eina_list_append(ls->nodes, nd);
ls->tmp.type_def = NULL;
break;
}
@@ -888,7 +883,10 @@ parse_unit(Eo_Lexer *ls)
}
return;
found_class:
- append_node(ls, NODE_CLASS, ls->tmp.kls);
+ nd = calloc(1, sizeof(Eo_Node));
+ nd->type = NODE_CLASS;
+ nd->def_class = ls->tmp.kls;
+ ls->nodes = eina_list_append(ls->nodes, nd);
ls->tmp.kls = NULL;
}