summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo_generator.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-13 12:06:48 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-21 09:26:04 +0100
commit057e01d67fdcbb715580a4e34af52f09de4e0e29 (patch)
treeb737b6d6d48d26136defe6d421601add3a42bec9 /src/bin/eolian/eo_generator.c
parentffbf149da16962b4c1540aa261c46d7e6b455021 (diff)
eolian: API refactoring
Start getting rid of the terrible _information_get APIs, starting with events.
Diffstat (limited to 'src/bin/eolian/eo_generator.c')
-rw-r--r--src/bin/eolian/eo_generator.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 505072ef77..3e34e24bf0 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -275,9 +275,8 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
275 itr = eolian_class_events_get(class); 275 itr = eolian_class_events_get(class);
276 EINA_ITERATOR_FOREACH(itr, event) 276 EINA_ITERATOR_FOREACH(itr, event)
277 { 277 {
278 const char *evname = NULL; 278 const char *evname = eolian_event_name_get(event);
279 const char *evdesc = NULL; 279 const char *evdesc = eolian_event_description_get(event);
280 eolian_class_event_information_get(event, &evname, NULL, &evdesc);
281 280
282 if (!evdesc) evdesc = "No description"; 281 if (!evdesc) evdesc = "No description";
283 eina_strbuf_reset(tmpbuf); 282 eina_strbuf_reset(tmpbuf);
@@ -556,13 +555,12 @@ eo_source_beginning_generate(const Eolian_Class *class, Eina_Strbuf *buf)
556 itr = eolian_class_events_get(class); 555 itr = eolian_class_events_get(class);
557 EINA_ITERATOR_FOREACH(itr, event) 556 EINA_ITERATOR_FOREACH(itr, event)
558 { 557 {
559 const char *evname; 558 const char *evname = eolian_event_name_get(event);
560 const char *evdesc; 559 const char *evdesc = eolian_event_description_get(event);
561 char *evdesc_line1; 560 char *evdesc_line1;
562 char *p; 561 char *p;
563 562
564 eina_strbuf_reset(str_ev); 563 eina_strbuf_reset(str_ev);
565 eolian_class_event_information_get(event, &evname, NULL, &evdesc);
566 evdesc_line1 = _source_desc_get(evdesc); 564 evdesc_line1 = _source_desc_get(evdesc);
567 eina_strbuf_append_printf(str_ev, "%s_EVENT_%s", class_env.upper_classname, evname); 565 eina_strbuf_append_printf(str_ev, "%s_EVENT_%s", class_env.upper_classname, evname);
568 p = (char *)eina_strbuf_string_get(str_ev); 566 p = (char *)eina_strbuf_string_get(str_ev);
@@ -776,11 +774,10 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
776 itr = eolian_class_events_get(class); 774 itr = eolian_class_events_get(class);
777 EINA_ITERATOR_FOREACH(itr, event) 775 EINA_ITERATOR_FOREACH(itr, event)
778 { 776 {
779 const char *evname; 777 const char *evname = eolian_event_name_get(event);
780 char *p; 778 char *p;
781 779
782 eina_strbuf_reset(tmpbuf); 780 eina_strbuf_reset(tmpbuf);
783 eolian_class_event_information_get(event, &evname, NULL, NULL);
784 eina_strbuf_append_printf(tmpbuf, "%s_EVENT_%s", class_env.upper_classname, evname); 781 eina_strbuf_append_printf(tmpbuf, "%s_EVENT_%s", class_env.upper_classname, evname);
785 p = (char *)eina_strbuf_string_get(tmpbuf); 782 p = (char *)eina_strbuf_string_get(tmpbuf);
786 eina_str_toupper(&p); 783 eina_str_toupper(&p);