summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/eolian/eo_generator.c19
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh3
-rw-r--r--src/lib/eolian/Eolian.h10
-rw-r--r--src/lib/eolian/database_event.c1
-rw-r--r--src/lib/eolian/database_event_api.c7
-rw-r--r--src/lib/eolian/database_print.c3
-rw-r--r--src/lib/eolian/eo_parser.c5
-rw-r--r--src/lib/eolian/eolian_database.h1
8 files changed, 7 insertions, 42 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index ca04359ccb..7d98eb9342 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -285,7 +285,6 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
285 EINA_ITERATOR_FOREACH(itr, event) 285 EINA_ITERATOR_FOREACH(itr, event)
286 { 286 {
287 Eina_Stringshare *evname = eolian_event_c_name_get(event); 287 Eina_Stringshare *evname = eolian_event_c_name_get(event);
288 const char *evdesc = eolian_event_description_get(event);
289 const Eolian_Documentation *evdoc = eolian_event_documentation_get(event); 288 const Eolian_Documentation *evdoc = eolian_event_documentation_get(event);
290 Eolian_Object_Scope scope = eolian_event_scope_get(event); 289 Eolian_Object_Scope scope = eolian_event_scope_get(event);
291 290
@@ -316,14 +315,7 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
316 eina_strbuf_free(evdbuf); 315 eina_strbuf_free(evdbuf);
317 } 316 }
318 else 317 else
319 { 318 eina_strbuf_append(str_ev, "/**\n * No description\n */\n");
320 if (!evdesc) evdesc = "No description";
321 eina_strbuf_reset(tmpbuf);
322 eina_strbuf_append(tmpbuf, evdesc);
323 eina_strbuf_replace_all(tmpbuf, "\n", "\n * ");
324 eina_strbuf_prepend(tmpbuf," * ");
325 eina_strbuf_append_printf(str_ev, "/**\n%s\n */\n", eina_strbuf_string_get(tmpbuf));
326 }
327 319
328 eina_strbuf_append_printf(str_ev, "#define %s (&(_%s))\n", evname, evname); 320 eina_strbuf_append_printf(str_ev, "#define %s (&(_%s))\n", evname, evname);
329 eina_strbuf_append_printf(str_extrn_ev, "EOAPI extern const Eo_Event_Description _%s;\n", evname); 321 eina_strbuf_append_printf(str_extrn_ev, "EOAPI extern const Eo_Event_Description _%s;\n", evname);
@@ -701,12 +693,9 @@ eo_source_beginning_generate(const Eolian_Class *class, Eina_Strbuf *buf)
701 EINA_ITERATOR_FOREACH(itr, event) 693 EINA_ITERATOR_FOREACH(itr, event)
702 { 694 {
703 Eina_Stringshare *evname = eolian_event_c_name_get(event); 695 Eina_Stringshare *evname = eolian_event_c_name_get(event);
704 const char *evdesc = eolian_event_description_get(event); 696 const char *evdesc = NULL;
705 if (!evdesc) 697 const Eolian_Documentation *doc = eolian_event_documentation_get(event);
706 { 698 if (doc) evdesc = eolian_documentation_summary_get(doc);
707 const Eolian_Documentation *doc = eolian_event_documentation_get(event);
708 if (doc) evdesc = eolian_documentation_summary_get(doc);
709 }
710 char *evdesc_line1 = _source_desc_get(evdesc); 699 char *evdesc_line1 = _source_desc_get(evdesc);
711 700
712 eina_strbuf_append_printf(tmpbuf, 701 eina_strbuf_append_printf(tmpbuf,
diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh
index 9e7ba07fbd..65f218d6e4 100644
--- a/src/bin/eolian_cxx/eolian_wrappers.hh
+++ b/src/bin/eolian_cxx/eolian_wrappers.hh
@@ -361,7 +361,8 @@ event_create(Eolian_Class const& klass, const Eolian_Event *event_)
361 event.name = normalize_spaces(name_); 361 event.name = normalize_spaces(name_);
362 event.eo_name = safe_upper 362 event.eo_name = safe_upper
363 (find_replace(class_full_name(klass), ".", "_") + "_EVENT_" + event.name); 363 (find_replace(class_full_name(klass), ".", "_") + "_EVENT_" + event.name);
364 event.comment = safe_str(eolian_event_description_get(event_)); 364 /* FIXME: use doc api */
365 event.comment = safe_str("");
365 } 366 }
366 return event; 367 return event;
367} 368}
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 91dd132dea..c7981371e3 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1340,16 +1340,6 @@ EAPI Eina_Stringshare *eolian_event_name_get(const Eolian_Event *event);
1340EAPI const Eolian_Type *eolian_event_type_get(const Eolian_Event *event); 1340EAPI const Eolian_Type *eolian_event_type_get(const Eolian_Event *event);
1341 1341
1342/* 1342/*
1343 * @brief Get the description of an event.
1344 *
1345 * @param[in] event the event handle
1346 * @return the description or NULL
1347 *
1348 * @ingroup Eolian
1349 */
1350EAPI Eina_Stringshare *eolian_event_description_get(const Eolian_Event *event);
1351
1352/*
1353 * @brief Get the documentation of an event. 1343 * @brief Get the documentation of an event.
1354 * 1344 *
1355 * @param[in] event the event handle 1345 * @param[in] event the event handle
diff --git a/src/lib/eolian/database_event.c b/src/lib/eolian/database_event.c
index 57d25e03ff..6dcd953990 100644
--- a/src/lib/eolian/database_event.c
+++ b/src/lib/eolian/database_event.c
@@ -10,7 +10,6 @@ database_event_del(Eolian_Event *event)
10{ 10{
11 if (!event) return; 11 if (!event) return;
12 if (event->name) eina_stringshare_del(event->name); 12 if (event->name) eina_stringshare_del(event->name);
13 if (event->comment) eina_stringshare_del(event->comment);
14 database_type_del(event->type); 13 database_type_del(event->type);
15 database_doc_del(event->doc); 14 database_doc_del(event->doc);
16 free(event); 15 free(event);
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 0a180e4878..58e906e99e 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -19,13 +19,6 @@ eolian_event_type_get(const Eolian_Event *event)
19 return event->type; 19 return event->type;
20} 20}
21 21
22EAPI Eina_Stringshare *
23eolian_event_description_get(const Eolian_Event *event)
24{
25 EINA_SAFETY_ON_NULL_RETURN_VAL(event, NULL);
26 return event->comment;
27}
28
29EAPI const Eolian_Documentation * 22EAPI const Eolian_Documentation *
30eolian_event_documentation_get(const Eolian_Event *event) 23eolian_event_documentation_get(const Eolian_Event *event)
31{ 24{
diff --git a/src/lib/eolian/database_print.c b/src/lib/eolian/database_print.c
index 0a20cc189b..741a363c47 100644
--- a/src/lib/eolian/database_print.c
+++ b/src/lib/eolian/database_print.c
@@ -46,10 +46,9 @@ static void
46_event_print(Eolian_Event *ev, int nb_spaces) 46_event_print(Eolian_Event *ev, int nb_spaces)
47{ 47{
48 const Eolian_Type *type = eolian_event_type_get(ev); 48 const Eolian_Type *type = eolian_event_type_get(ev);
49 const char *desc = eolian_event_description_get(ev);
50 printf("%*s <%s> <", nb_spaces + 5, "", eolian_event_name_get(ev)); 49 printf("%*s <%s> <", nb_spaces + 5, "", eolian_event_name_get(ev));
51 if (type) database_type_print((Eolian_Type*)type); 50 if (type) database_type_print((Eolian_Type*)type);
52 printf("> <%s>\n", desc ? desc : ""); 51 printf(">\n");
53} 52}
54 53
55static Eina_Bool _function_print(const Eolian_Function *fid, int nb_spaces) 54static 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 71c6d284f7..e074f3ef43 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1583,11 +1583,6 @@ parse_event(Eo_Lexer *ls)
1583 } 1583 }
1584 check(ls, ';'); 1584 check(ls, ';');
1585 eo_lexer_get(ls); 1585 eo_lexer_get(ls);
1586 if (ls->t.token == TOK_COMMENT)
1587 {
1588 ev->comment = eina_stringshare_ref(ls->t.value.s);
1589 eo_lexer_get(ls);
1590 }
1591 FILL_DOC(ls, ev, doc); 1586 FILL_DOC(ls, ev, doc);
1592 ev->klass = ls->tmp.kls; 1587 ev->klass = ls->tmp.kls;
1593} 1588}
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 36864e59c6..02b8bb1bd6 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -209,7 +209,6 @@ struct _Eolian_Event
209{ 209{
210 Eolian_Object base; 210 Eolian_Object base;
211 Eina_Stringshare *name; 211 Eina_Stringshare *name;
212 Eina_Stringshare *comment;
213 Eolian_Documentation *doc; 212 Eolian_Documentation *doc;
214 Eolian_Type *type; 213 Eolian_Type *type;
215 Eolian_Class *klass; 214 Eolian_Class *klass;