aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-07-11 11:47:37 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-07-11 11:47:37 +0100
commit883c4ca7df68507aaaad5d44bfa6896ed1a7ed49 (patch)
treed3bf5982e2da54af32df36d375ffdfd4b150da28 /src/lib
parenteolian: remove parser dump for now (doesn't include all info, when it's neede... (diff)
downloadefl-883c4ca7df68507aaaad5d44bfa6896ed1a7ed49.tar.gz
eolian: events now use Eolian_Type* instead of stringshare
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eolian/Eolian.h3
-rw-r--r--src/lib/eolian/database_event.c2
-rw-r--r--src/lib/eolian/database_event_api.c2
-rw-r--r--src/lib/eolian/database_print.c7
-rw-r--r--src/lib/eolian/eo_parser.c4
-rw-r--r--src/lib/eolian/eolian_database.h2
6 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index fa4ee7b287..764a16e391 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -670,12 +670,13 @@ EAPI const Eina_List *eolian_class_events_list_get(const Eolian_Class *klass);
*
* @param[in] event handle of the event
* @param[out] event_name name of the event
+ * @param[out] event_type type of the event
* @param[out] event_desc description of the event
* @return EINA_TRUE on success, EINA_FALSE otherwise.
*
* @ingroup Eolian
*/
-EAPI Eina_Bool eolian_class_event_information_get(const Eolian_Event *event, const char **event_name, const char **event_type, const char **event_desc);
+EAPI Eina_Bool eolian_class_event_information_get(const Eolian_Event *event, const char **event_name, const Eolian_Type **event_type, const char **event_desc);
/*
* @brief Indicates if the class constructor has to invoke
diff --git a/src/lib/eolian/database_event.c b/src/lib/eolian/database_event.c
index f51a408d81..8549c1ee41 100644
--- a/src/lib/eolian/database_event.c
+++ b/src/lib/eolian/database_event.c
@@ -6,7 +6,7 @@ database_event_del(Eolian_Event *event)
{
if (!event) return;
if (event->name) eina_stringshare_del(event->name);
- if (event->type) eina_stringshare_del(event->type);
if (event->comment) eina_stringshare_del(event->comment);
+ database_type_del(event->type);
free(event);
}
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 5a184ff6c9..520ef93558 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -2,7 +2,7 @@
#include "eolian_database.h"
EAPI Eina_Bool
-eolian_class_event_information_get(const Eolian_Event *event, const char **event_name, const char **event_type, const char **event_comment)
+eolian_class_event_information_get(const Eolian_Event *event, const char **event_name, const Eolian_Type **event_type, const char **event_comment)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE);
if (event_name) *event_name = event->name;
diff --git a/src/lib/eolian/database_print.c b/src/lib/eolian/database_print.c
index aef936b651..2d66460d73 100644
--- a/src/lib/eolian/database_print.c
+++ b/src/lib/eolian/database_print.c
@@ -29,10 +29,13 @@ _implements_print(Eolian_Implement *impl, int nb_spaces)
static void
_event_print(Eolian_Event *ev, int nb_spaces)
{
- const char *name, *comment, *type;
+ const char *name, *comment;
+ const Eolian_Type *type;
eolian_class_event_information_get(ev, &name, &type, &comment);
- printf("%*s <%s> <%s> <%s>\n", nb_spaces + 5, "", name, type, comment);
+ printf("%*s <%s> <", nb_spaces + 5, "", name);
+ database_type_print((Eolian_Type*)type);
+ printf("> <%s>\n", comment);
}
static Eina_Bool _function_print(const Eolian_Function *fid, int nb_spaces)
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 8bcf1a8432..9c8649d9cc 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -808,9 +808,9 @@ parse_event(Eo_Lexer *ls)
if (ls->t.token == '(')
{
int line = ls->line_number, col = ls->column;
- eo_lexer_get_balanced(ls, '(', ')');
- ev->type = eina_stringshare_add(ls->t.value);
eo_lexer_get(ls);
+ ev->type = parse_type(ls);
+ pop_type(ls);
check_match(ls, ')', '(', line, col);
}
check(ls, ';');
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index bd146479ff..f208138682 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -130,8 +130,8 @@ struct _Eolian_Implement
struct _Eolian_Event
{
Eina_Stringshare *name;
- Eina_Stringshare *type;
Eina_Stringshare *comment;
+ Eolian_Type *type;
};
typedef struct _Eolian_Typedef