q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3d8069f226e28e3bb9a822753257e9b840b83bbb
commit 3d8069f226e28e3bb9a822753257e9b840b83bbb Author: Daniel Kolesa <d.kol...@samsung.com> Date: Fri Sep 12 15:04:18 2014 +0100 eolian: remove str_items from temps --- src/lib/eolian/eo_lexer.c | 3 --- src/lib/eolian/eo_lexer.h | 1 - src/lib/eolian/eo_parser.c | 17 ++++++----------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c index 4601ee4..0378470 100644 --- a/src/lib/eolian/eo_lexer.c +++ b/src/lib/eolian/eo_lexer.c @@ -720,9 +720,6 @@ _temps_free(Eo_Lexer_Temps *tmp) EINA_LIST_FREE(tmp->type_defs, tp) database_type_del(tp); - EINA_LIST_FREE(tmp->str_items, s) - if (s) eina_stringshare_del(s); - EINA_LIST_FREE(tmp->strs, s) if (s) eina_stringshare_del(s); diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index 5a6e630..56495e5 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -100,7 +100,6 @@ typedef struct _Eo_Lexer_Temps Eina_List *classes; Eina_List *str_bufs; Eina_List *type_defs; - Eina_List *str_items; Eina_List *expr_defs; Eina_List *strs; } Eo_Lexer_Temps; diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index dc64db7..1140d56 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -176,22 +176,20 @@ parse_name(Eo_Lexer *ls, Eina_Strbuf *buf) return buf; } -static Eina_List * -parse_name_list(Eo_Lexer *ls) +static void +parse_name_list(Eo_Lexer *ls, Eina_List **out) { Eina_Strbuf *buf = push_strbuf(ls); - ls->tmp.str_items = NULL; parse_name(ls, buf); - ls->tmp.str_items = eina_list_append(ls->tmp.str_items, + *out = eina_list_append(*out, eina_stringshare_add(eina_strbuf_string_get(buf))); while (test_next(ls, ',')) { parse_name(ls, buf); - ls->tmp.str_items = eina_list_append(ls->tmp.str_items, - eina_stringshare_add(eina_strbuf_string_get(buf))); + *out = eina_list_append(*out, + eina_stringshare_add(eina_strbuf_string_get(buf))); } pop_strbuf(ls); - return ls->tmp.str_items; } #define NAMESPACE_PARSE(def, dname) \ @@ -1853,10 +1851,7 @@ parse_class(Eo_Lexer *ls, Eolian_Class_Type type) col = ls->column; check_next(ls, '('); if (ls->t.token != ')') - { - ls->tmp.kls->inherits = parse_name_list(ls); - ls->tmp.str_items = NULL; - } + parse_name_list(ls, &ls->tmp.kls->inherits); check_match(ls, ')', '(', line, col); } line = ls->line_number; --