From 950322fd12fcfc359c7e2fdd4b0d0922dc9b2f5c Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 11 Jun 2015 17:14:51 +0100 Subject: [PATCH] eolian: remove support for old event doc syntax --- src/bin/eolian/eo_generator.c | 19 ++++--------------- src/bin/eolian_cxx/eolian_wrappers.hh | 3 ++- src/lib/eolian/Eolian.h | 10 ---------- src/lib/eolian/database_event.c | 1 - src/lib/eolian/database_event_api.c | 7 ------- src/lib/eolian/database_print.c | 3 +-- src/lib/eolian/eo_parser.c | 5 ----- src/lib/eolian/eolian_database.h | 1 - 8 files changed, 7 insertions(+), 42 deletions(-) diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index ca04359..7d98eb9 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) EINA_ITERATOR_FOREACH(itr, event) { Eina_Stringshare *evname = eolian_event_c_name_get(event); - const char *evdesc = eolian_event_description_get(event); const Eolian_Documentation *evdoc = eolian_event_documentation_get(event); Eolian_Object_Scope scope = eolian_event_scope_get(event); @@ -316,14 +315,7 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf) eina_strbuf_free(evdbuf); } else - { - if (!evdesc) evdesc = "No description"; - eina_strbuf_reset(tmpbuf); - eina_strbuf_append(tmpbuf, evdesc); - eina_strbuf_replace_all(tmpbuf, "\n", "\n * "); - eina_strbuf_prepend(tmpbuf," * "); - eina_strbuf_append_printf(str_ev, "/**\n%s\n */\n", eina_strbuf_string_get(tmpbuf)); - } + eina_strbuf_append(str_ev, "/**\n * No description\n */\n"); eina_strbuf_append_printf(str_ev, "#define %s (&(_%s))\n", evname, evname); 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) EINA_ITERATOR_FOREACH(itr, event) { Eina_Stringshare *evname = eolian_event_c_name_get(event); - const char *evdesc = eolian_event_description_get(event); - if (!evdesc) - { - const Eolian_Documentation *doc = eolian_event_documentation_get(event); - if (doc) evdesc = eolian_documentation_summary_get(doc); - } + const char *evdesc = NULL; + const Eolian_Documentation *doc = eolian_event_documentation_get(event); + if (doc) evdesc = eolian_documentation_summary_get(doc); char *evdesc_line1 = _source_desc_get(evdesc); eina_strbuf_append_printf(tmpbuf, diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh index 9e7ba07..65f218d 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_) event.name = normalize_spaces(name_); event.eo_name = safe_upper (find_replace(class_full_name(klass), ".", "_") + "_EVENT_" + event.name); - event.comment = safe_str(eolian_event_description_get(event_)); + /* FIXME: use doc api */ + event.comment = safe_str(""); } return event; } diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 91dd132..c798137 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); EAPI const Eolian_Type *eolian_event_type_get(const Eolian_Event *event); /* - * @brief Get the description of an event. - * - * @param[in] event the event handle - * @return the description or NULL - * - * @ingroup Eolian - */ -EAPI Eina_Stringshare *eolian_event_description_get(const Eolian_Event *event); - -/* * @brief Get the documentation of an event. * * @param[in] event the event handle diff --git a/src/lib/eolian/database_event.c b/src/lib/eolian/database_event.c index 57d25e0..6dcd953 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) { if (!event) return; if (event->name) eina_stringshare_del(event->name); - if (event->comment) eina_stringshare_del(event->comment); database_type_del(event->type); database_doc_del(event->doc); free(event); diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c index 0a180e4..58e906e 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) return event->type; } -EAPI Eina_Stringshare * -eolian_event_description_get(const Eolian_Event *event) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(event, NULL); - return event->comment; -} - EAPI const Eolian_Documentation * eolian_event_documentation_get(const Eolian_Event *event) { diff --git a/src/lib/eolian/database_print.c b/src/lib/eolian/database_print.c index 0a20cc1..741a363 100644 --- a/src/lib/eolian/database_print.c +++ b/src/lib/eolian/database_print.c @@ -46,10 +46,9 @@ static void _event_print(Eolian_Event *ev, int nb_spaces) { const Eolian_Type *type = eolian_event_type_get(ev); - const char *desc = eolian_event_description_get(ev); printf("%*s <%s> <", nb_spaces + 5, "", eolian_event_name_get(ev)); if (type) database_type_print((Eolian_Type*)type); - printf("> <%s>\n", desc ? desc : ""); + printf(">\n"); } 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 71c6d28..e074f3e 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -1583,11 +1583,6 @@ parse_event(Eo_Lexer *ls) } check(ls, ';'); eo_lexer_get(ls); - if (ls->t.token == TOK_COMMENT) - { - ev->comment = eina_stringshare_ref(ls->t.value.s); - eo_lexer_get(ls); - } FILL_DOC(ls, ev, doc); ev->klass = ls->tmp.kls; } diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 36864e5..02b8bb1 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -209,7 +209,6 @@ struct _Eolian_Event { Eolian_Object base; Eina_Stringshare *name; - Eina_Stringshare *comment; Eolian_Documentation *doc; Eolian_Type *type; Eolian_Class *klass; -- 2.7.4