q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dd6f167795bf8f0c6c5598f69a30ddf10892a72b

commit dd6f167795bf8f0c6c5598f69a30ddf10892a72b
Author: Daniel Kolesa <d.kol...@samsung.com>
Date:   Fri Sep 12 13:35:48 2014 +0100

    eolian: more temp cleanups
---
 src/lib/eolian/eo_definitions.c |  4 ----
 src/lib/eolian/eo_definitions.h |  3 +--
 src/lib/eolian/eo_parser.c      | 22 +++++++++-------------
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/lib/eolian/eo_definitions.c b/src/lib/eolian/eo_definitions.c
index 01643f4..beae132 100644
--- a/src/lib/eolian/eo_definitions.c
+++ b/src/lib/eolian/eo_definitions.c
@@ -7,7 +7,6 @@ void
 eo_definitions_temps_free(Eo_Lexer_Temps *tmp)
 {
    Eina_Strbuf *buf;
-   Eolian_Function_Parameter *par;
    Eolian_Type *tp;
    Eolian_Variable *var;
    Eolian_Class *cl;
@@ -16,9 +15,6 @@ eo_definitions_temps_free(Eo_Lexer_Temps *tmp)
    EINA_LIST_FREE(tmp->str_bufs, buf)
      eina_strbuf_free(buf);
 
-   EINA_LIST_FREE(tmp->params, par)
-     database_parameter_del(par);
-
    if (tmp->kls)
      database_class_del(tmp->kls);
 
diff --git a/src/lib/eolian/eo_definitions.h b/src/lib/eolian/eo_definitions.h
index 8b304c1..cc1193b 100644
--- a/src/lib/eolian/eo_definitions.h
+++ b/src/lib/eolian/eo_definitions.h
@@ -10,10 +10,9 @@
 
 typedef struct _Eo_Lexer_Temps
 {
+   Eolian_Class *kls;
    Eina_List *classes;
    Eina_List *str_bufs;
-   Eina_List *params;
-   Eolian_Class *kls;
    Eina_List *type_defs;
    Eina_List *var_defs;
    Eina_List *str_items;
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 937f295..9eeca8c 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1136,13 +1136,14 @@ parse_return(Eo_Lexer *ls, Eo_Ret_Def *ret, Eina_Bool 
allow_void)
 }
 
 static void
-parse_param(Eo_Lexer *ls, Eina_Bool allow_inout, Eina_Bool is_vals)
+parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
+            Eina_Bool is_vals)
 {
    Eolian_Function_Parameter *par = calloc(1, 
sizeof(Eolian_Function_Parameter));
    par->base.file = eina_stringshare_ref(ls->filename);
    par->base.line = ls->line_number;
    par->base.column = ls->column;
-   ls->tmp.params = eina_list_append(ls->tmp.params, par);
+   *params = eina_list_append(*params, par);
    if (allow_inout)
      {
         if (ls->t.kw == KW_at_in)
@@ -1309,9 +1310,10 @@ end:
 }
 
 static void
-parse_params(Eo_Lexer *ls, Eina_Bool allow_inout, Eina_Bool is_vals)
+parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
+             Eina_Bool is_vals)
 {
-   PARSE_SECTION parse_param(ls, allow_inout, is_vals);
+   PARSE_SECTION parse_param(ls, params, allow_inout, is_vals);
    check_match(ls, '}', '{', line, col);
 }
 
@@ -1381,15 +1383,11 @@ body:
         break;
       case KW_keys:
         CASE_LOCK(ls, keys, "keys definition")
-        parse_params(ls, EINA_FALSE, EINA_FALSE);
-        prop->keys = ls->tmp.params;
-        ls->tmp.params = NULL;
+        parse_params(ls, &prop->keys, EINA_FALSE, EINA_FALSE);
         break;
       case KW_values:
         CASE_LOCK(ls, values, "values definition")
-        parse_params(ls, EINA_FALSE, EINA_TRUE);
-        prop->params = ls->tmp.params;
-        ls->tmp.params = NULL;
+        parse_params(ls, &prop->params, EINA_FALSE, EINA_TRUE);
         break;
       default:
         goto end;
@@ -1495,9 +1493,7 @@ body:
         break;
       case KW_params:
         CASE_LOCK(ls, params, "params definition")
-        parse_params(ls, EINA_TRUE, EINA_FALSE);
-        meth->params = ls->tmp.params;
-        ls->tmp.params = NULL;
+        parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE);
         break;
       default:
         goto end;

-- 


Reply via email to