summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-03-08 15:32:01 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2019-03-08 15:34:25 +0100
commitc27df3bb5090729be7ef0cf23514ea4ae61c3f2a (patch)
tree2675876e3a1a2765584af59aeda83e7669701c69
parenta007badbed3972f86bdd09dd974fbfbbde5bc20d (diff)
downloadefl-devs/q66/eolian-remove-legacy.tar.gz
eolian: remove legacy handling API and most of generationdevs/q66/eolian-remove-legacy
This removes all Eolian API that deals with handling of legacy code. It also removes the code using it in the generator as well as bindings, but for now keeps generation of .eo.legacy.h types, as there are still instances in our codebase where things are otherwise broken. We can remove the rest once that is resolved.
-rw-r--r--src/Makefile_Eolian.am3
-rw-r--r--src/bin/eolian/docs.c42
-rw-r--r--src/bin/eolian/docs.h3
-rw-r--r--src/bin/eolian/headers.c198
-rw-r--r--src/bin/eolian/main.c29
-rw-r--r--src/bin/eolian/sources.c83
-rw-r--r--src/bin/eolian/sources.h2
-rw-r--r--src/bin/eolian_mono/eolian/mono/documentation.hh2
-rw-r--r--src/bindings/luajit/eolian.lua25
-rw-r--r--src/examples/eolian_cxx/ns_colourable.eo1
-rw-r--r--src/examples/eolian_cxx/ns_colourablesquare.eo1
-rw-r--r--src/lib/eolian/Eolian.h44
-rw-r--r--src/lib/eolian/database_class.c1
-rw-r--r--src/lib/eolian/database_class_api.c7
-rw-r--r--src/lib/eolian/database_function.c2
-rw-r--r--src/lib/eolian/database_function_api.c101
-rw-r--r--src/lib/eolian/database_type.c1
-rw-r--r--src/lib/eolian/database_validate.c2
-rw-r--r--src/lib/eolian/eo_lexer.h4
-rw-r--r--src/lib/eolian/eo_parser.c70
-rw-r--r--src/lib/eolian/eolian_database.h6
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp14
-rw-r--r--src/scripts/pyolian/eolian.py26
-rw-r--r--src/scripts/pyolian/eolian_lib.py16
-rw-r--r--src/tests/eolian/data/class_simple.eo13
-rw-r--r--src/tests/eolian/data/class_simple_ref.c12
-rw-r--r--src/tests/eolian/data/class_simple_ref.legacy.c12
-rw-r--r--src/tests/eolian/data/class_simple_ref_eo.h4
-rw-r--r--src/tests/eolian/data/class_simple_ref_legacy.h41
-rw-r--r--src/tests/eolian/data/docs.eo1
-rw-r--r--src/tests/eolian/data/docs_ref_legacy.h119
-rw-r--r--src/tests/eolian/eolian_generation.c5
-rw-r--r--src/tests/eolian/eolian_parsing.c15
-rw-r--r--src/tests/eolian_cxx/docs.eo1
34 files changed, 144 insertions, 762 deletions
diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index c3a6d7b364..06c7638c8e 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -159,13 +159,10 @@ tests/eolian/data/struct_ref.h \
tests/eolian/data/struct_ref_stub.h \
tests/eolian/data/owning.eo.c \
tests/eolian/data/class_simple_ref.c \
-tests/eolian/data/class_simple_ref.legacy.c \
tests/eolian/data/override_ref.c \
tests/eolian/data/class_simple_ref_eo.h \
-tests/eolian/data/class_simple_ref_legacy.h \
tests/eolian/data/import_types_ref.h \
tests/eolian/data/docs_ref.h \
-tests/eolian/data/docs_ref_legacy.h \
tests/eolian/data/function_types_ref.h \
tests/eolian/data/function_as_argument_impl_ref.c \
tests/eolian/data/function_as_argument_ref.c \
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 5690594230..39fa89a429 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -111,7 +111,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
if (!fn) goto noref;
- Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype, use_legacy);
+ Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype);
if (!fcn) goto noref;
eina_strbuf_append(wbuf, fcn);
eina_stringshare_del(fcn);
@@ -408,8 +408,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev,
Eina_Strbuf *
eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
- Eolian_Function_Type ftype, int indent,
- Eina_Bool use_legacy)
+ Eolian_Function_Type ftype, int indent)
{
const Eolian_Function_Parameter *par = NULL;
const Eolian_Function_Parameter *vpar = NULL;
@@ -427,28 +426,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
int curl = 0;
- const char *group = NULL;
- char legacy_group_name[1024];
- if (use_legacy)
- {
- // Generate legacy doxygen group name
- const char *prefix =
- eolian_class_legacy_prefix_get(eolian_function_class_get(fid));
- unsigned int i;
- snprintf(legacy_group_name, sizeof(legacy_group_name),
- "%s_Group", prefix);
- for (i = 0; i < strlen(legacy_group_name); i++)
- {
- if ((i == 0) || (legacy_group_name[i - 1] == '_'))
- legacy_group_name[i] = toupper(legacy_group_name[i]);
- }
- group = legacy_group_name;
- }
- else
- {
- group = eolian_class_name_get(eolian_function_class_get(fid));
- }
-
+ const char *group = eolian_class_name_get(eolian_function_class_get(fid));
const Eolian_Implement *fimp = eolian_function_implement_get(fid);
if (ftype == EOLIAN_METHOD)
@@ -539,7 +517,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc))
{
_gen_doc_brief(state, sum ? sum : "No description supplied.", since, group,
- NULL, indent, buf, use_legacy);
+ NULL, indent, buf, EINA_FALSE);
return buf;
}
@@ -550,7 +528,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append(buf, " * @brief ");
curl += sizeof(" * @brief ") - 1;
_append_section(state, sum ? sum : "No description supplied.",
- indent, curl, buf, wbuf, use_legacy);
+ indent, curl, buf, wbuf, EINA_FALSE);
eina_strbuf_append_char(buf, '\n');
if (desc || since || par || rdoc || pdoc)
@@ -563,7 +541,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
{
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
- _append_section(state, desc, indent, curl + 3, buf, wbuf, use_legacy);
+ _append_section(state, desc, indent, curl + 3, buf, wbuf, EINA_FALSE);
eina_strbuf_append_char(buf, '\n');
if (par || rdoc || pdoc || since)
{
@@ -578,7 +556,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
_append_section(state, eolian_documentation_summary_get(pdoc), indent,
- curl + 3, buf, wbuf, use_legacy);
+ curl + 3, buf, wbuf, EINA_FALSE);
eina_strbuf_append_char(buf, '\n');
if (pdesc)
{
@@ -586,7 +564,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append(buf, " *\n");
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
- _append_section(state, pdesc, indent, curl + 3, buf, wbuf, use_legacy);
+ _append_section(state, pdesc, indent, curl + 3, buf, wbuf, EINA_FALSE);
eina_strbuf_append_char(buf, '\n');
}
if (par || rdoc || since)
@@ -641,7 +619,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append_char(buf, ' ');
curl += 1;
_append_section(state, eolian_documentation_summary_get(adoc),
- indent, curl, buf, wbuf, use_legacy);
+ indent, curl, buf, wbuf, EINA_FALSE);
}
eina_strbuf_append_char(buf, '\n');
@@ -674,7 +652,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
eina_strbuf_append(buf, " * @return ");
curl += sizeof(" * @return ") - 1;
_append_section(state, eolian_documentation_summary_get(rdoc), indent,
- curl, buf, wbuf, use_legacy);
+ curl, buf, wbuf, EINA_FALSE);
eina_strbuf_append_char(buf, '\n');
if (since)
{
diff --git a/src/bin/eolian/docs.h b/src/bin/eolian/docs.h
index 79112f9758..91866ec012 100644
--- a/src/bin/eolian/docs.h
+++ b/src/bin/eolian/docs.h
@@ -22,12 +22,11 @@ Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Docume
* @param[in] fid te function
* @param[in] type the function type (either METHOD, PROP_GET, PROP_SET)
* @param[in] indent by how many spaces to indent the comment from second line
- * @param[in] use_legacy whether to use legacy names
*
* @return A documentation comment
*
*/
-Eina_Strbuf *eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, Eolian_Function_Type ftype, int indent, Eina_Bool use_legacy);
+Eina_Strbuf *eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, Eolian_Function_Type ftype, int indent);
/*
* @brief Generate event documentation
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 7fbd576082..cc3b0ee293 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -67,10 +67,9 @@ eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf,
static void
_gen_func(const Eolian_State *state, const Eolian_Function *fid,
- Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cname,
- char *cnameu, Eina_Bool legacy)
+ Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cnameu)
{
- Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, legacy);
+ Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype);
if (!fcn)
return;
@@ -90,11 +89,9 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
Eolian_Object_Scope fsc = eolian_function_scope_get(fid, ftype);
- /* this one will never be satisfied in legacy */
if (eolian_function_is_beta(fid))
eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
- /* XXX: is this right? we expose potentially internal stuff into legacy */
- if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
+ if (fsc == EOLIAN_SCOPE_PROTECTED)
eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
const Eolian_Implement *fimp = eolian_function_implement_get(fid);
@@ -104,12 +101,12 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY);
if (hasdoc)
{
- Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0, legacy);
+ Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0);
eina_strbuf_append(buf, eina_strbuf_string_get(dbuf));
eina_strbuf_append_char(buf, '\n');
eina_strbuf_free(dbuf);
}
- eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI ");
+ eina_strbuf_append(buf, "EOAPI ");
if (rtp)
{
Eina_Stringshare *rtps = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN);
@@ -135,10 +132,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
{
eina_strbuf_append(buf, "const ");
}
- if (legacy)
- eina_strbuf_append_printf(buf, "%s *obj", cname);
- else
- eina_strbuf_append(buf, "Eo *obj");
+ eina_strbuf_append(buf, "Eo *obj");
}
eo_gen_params(eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY);
@@ -174,7 +168,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
}
eina_strbuf_append(buf, ";\n");
- if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
+ if (fsc == EOLIAN_SCOPE_PROTECTED)
eina_strbuf_append_printf(buf, "#endif\n");
if (eolian_function_is_beta(fid))
eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
@@ -184,129 +178,119 @@ void
eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
Eina_Strbuf *buf, Eina_Bool legacy)
{
- if (!cl)
+ if (!cl || legacy)
return;
- char *cname = NULL, *cnameu = NULL;
- eo_gen_class_names_get(cl, &cname, &cnameu, NULL);
+ Eina_Iterator *itr;
+ Eolian_Event *ev;
+ char *cnameu = NULL;
+ eo_gen_class_names_get(cl, NULL, &cnameu, NULL);
/* class definition */
- if (!legacy && eolian_class_is_beta(cl))
+ if (eolian_class_is_beta(cl))
{
eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
}
- if (!legacy)
+ const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
+ if (doc)
{
- const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
- if (doc)
+ Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
+ eolian_class_name_get(cl), 0, EINA_FALSE);
+ if (cdoc)
{
- Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
- eolian_class_name_get(cl), 0, EINA_FALSE);
- if (cdoc)
- {
- eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
- eina_strbuf_append_char(buf, '\n');
- eina_strbuf_free(cdoc);
- }
+ eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
+ eina_strbuf_append_char(buf, '\n');
+ eina_strbuf_free(cdoc);
}
+ }
- Eina_Stringshare *mname = eolian_class_c_name_get(cl);
- Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl);
- eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname);
- eina_stringshare_del(mname);
+ Eina_Stringshare *mname = eolian_class_c_name_get(cl);
+ Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl);
+ eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname);
+ eina_stringshare_del(mname);
- eina_strbuf_append_printf(buf, "EWAPI const Efl_Class *%s(void);\n", gname);
- eina_stringshare_del(gname);
- }
+ eina_strbuf_append_printf(buf, "EWAPI const Efl_Class *%s(void);\n", gname);
+ eina_stringshare_del(gname);
/* method section */
- {
- Eina_Iterator *itr = eolian_class_implements_get(cl);
- if (!itr)
- goto events;
-
- const Eolian_Implement *imp;
- EINA_ITERATOR_FOREACH(itr, imp)
- {
- if (eolian_implement_class_get(imp) != cl)
- continue;
- Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
- const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype);
- /* beta can only exist for eo api */
- if (legacy && eolian_function_is_beta(fid))
- continue;
- eina_strbuf_append_char(buf, '\n');
- switch (ftype)
- {
- case EOLIAN_PROP_GET:
- case EOLIAN_PROP_SET:
- _gen_func(state, fid, ftype, buf, cname, cnameu, legacy);
- break;
- case EOLIAN_PROPERTY:
- _gen_func(state, fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy);
- eina_strbuf_append_char(buf, '\n');
- _gen_func(state, fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy);
- break;
- default:
- _gen_func(state, fid, EOLIAN_METHOD, buf, cname, cnameu, legacy);
- }
- }
- eina_iterator_free(itr);
- }
+ itr = eolian_class_implements_get(cl);
+ if (!itr)
+ goto events;
+
+ const Eolian_Implement *imp;
+ EINA_ITERATOR_FOREACH(itr, imp)
+ {
+ if (eolian_implement_class_get(imp) != cl)
+ continue;
+ Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
+ const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype);
+ eina_strbuf_append_char(buf, '\n');
+ switch (ftype)
+ {
+ case EOLIAN_PROP_GET:
+ case EOLIAN_PROP_SET:
+ _gen_func(state, fid, ftype, buf, cnameu);
+ break;
+ case EOLIAN_PROPERTY:
+ _gen_func(state, fid, EOLIAN_PROP_SET, buf, cnameu);
+ eina_strbuf_append_char(buf, '\n');
+ _gen_func(state, fid, EOLIAN_PROP_GET, buf, cnameu);
+ break;
+ default:
+ _gen_func(state, fid, EOLIAN_METHOD, buf, cnameu);
+ }
+ }
+ eina_iterator_free(itr);
events:
/* event section */
- if (!legacy)
+ itr = eolian_class_events_get(cl);
+ EINA_ITERATOR_FOREACH(itr, ev)
{
- Eina_Iterator *itr = eolian_class_events_get(cl);
- Eolian_Event *ev;
- EINA_ITERATOR_FOREACH(itr, ev)
+ Eina_Stringshare *evn = eolian_event_c_name_get(ev);
+ Eolian_Object_Scope evs = eolian_event_scope_get(ev);
+
+ if (evs == EOLIAN_SCOPE_PRIVATE)
+ continue;
+
+ if (eolian_event_is_beta(ev))
{
- Eina_Stringshare *evn = eolian_event_c_name_get(ev);
- Eolian_Object_Scope evs = eolian_event_scope_get(ev);
-
- if (evs == EOLIAN_SCOPE_PRIVATE)
- continue;
-
- if (eolian_event_is_beta(ev))
- {
- eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
- }
- if (evs == EOLIAN_SCOPE_PROTECTED)
- {
- if (!eolian_event_is_beta(ev))
- eina_strbuf_append_char(buf, '\n');
- eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
- }
-
- if (!eolian_event_is_beta(ev) && evs == EOLIAN_SCOPE_PUBLIC)
+ eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
+ }
+ if (evs == EOLIAN_SCOPE_PROTECTED)
+ {
+ if (!eolian_event_is_beta(ev))
eina_strbuf_append_char(buf, '\n');
+ eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
+ }
- eina_strbuf_append_printf(buf, "EWAPI extern const "
- "Efl_Event_Description _%s;\n\n", evn);
+ if (!eolian_event_is_beta(ev) && evs == EOLIAN_SCOPE_PUBLIC)
+ eina_strbuf_append_char(buf, '\n');
- Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
- eolian_class_name_get(cl));
- eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
- eina_strbuf_append_char(buf, '\n');
- eina_strbuf_free(evdbuf);
- eina_strbuf_append_printf(buf, "#define %s (&(_%s))\n", evn, evn);
+ eina_strbuf_append_printf(buf, "EWAPI extern const "
+ "Efl_Event_Description _%s;\n\n", evn);
- if (evs == EOLIAN_SCOPE_PROTECTED)
- eina_strbuf_append(buf, "#endif\n");
- if (eolian_event_is_beta(ev))
- eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
+ Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
+ eolian_class_name_get(cl));
+ eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
+ eina_strbuf_append_char(buf, '\n');
+ eina_strbuf_free(evdbuf);
+ eina_strbuf_append_printf(buf, "#define %s (&(_%s))\n", evn, evn);
- eina_stringshare_del(evn);
- }
- eina_iterator_free(itr);
+ if (evs == EOLIAN_SCOPE_PROTECTED)
+ eina_strbuf_append(buf, "#endif\n");
+ if (eolian_event_is_beta(ev))
+ eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
+
+ eina_stringshare_del(evn);
}
- if (!legacy && eolian_class_is_beta(cl))
+ eina_iterator_free(itr);
+
+ if (eolian_class_is_beta(cl))
{
eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
}
- free(cname);
free(cnameu);
}
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index c847b0cb9f..06f32fd418 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -396,47 +396,20 @@ _write_source(const Eolian_State *eos, const char *ofname,
{
INF("generating source: %s", ofname);
Eina_Strbuf *buf = eina_strbuf_new();
- Eina_Strbuf *lbuf = eina_strbuf_new();
- Eina_Strbuf *oflname = eina_strbuf_new();
Eina_Bool ret = EINA_FALSE;
- const char *lext = strrchr(ofname, '.');
- if (!lext)
- {
- eina_strbuf_append(oflname, ofname);
- eina_strbuf_append(oflname, ".legacy.c");
- }
- else
- {
- eina_strbuf_append_length(oflname, ofname, strlen(ofname) - strlen(lext));
- eina_strbuf_append(oflname, ".legacy");
- eina_strbuf_append(oflname, lext);
- }
- const char *lfname = eina_strbuf_string_get(oflname);
- {
- const char *p1 = strrchr(lfname, '/');
- const char *p2 = strrchr(lfname, '\\');
- lfname = (p1 || p2) ? ((p1 > p2) ? (p1 + 1) : (p2 + 1)) : lfname;
- }
const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf);
- eo_gen_source_gen(cl, buf, lbuf, lfname);
+ eo_gen_source_gen(cl, buf);
if (cl || (eot && eina_strbuf_length_get(buf)))
{
if (!_write_file(ofname, buf))
goto done;
- if (eina_strbuf_length_get(lbuf))
- {
- if (!_write_file(eina_strbuf_string_get(oflname), lbuf))
- goto done;
- }
ret = EINA_TRUE;
}
done:
eina_strbuf_free(buf);
- eina_strbuf_free(lbuf);
- eina_strbuf_free(oflname);
return ret;
}
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index a973dd35f5..b04729b08a 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -358,7 +358,7 @@ _gen_reflect_get(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN);
const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : "";
- Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET, EINA_FALSE);
+ Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET);
eina_strbuf_append_printf(buf, " %s%sval = %s(obj);\n", ct, starsp, fcn);
eina_stringshare_del(fcn);
eina_stringshare_del(ct);
@@ -402,7 +402,7 @@ _gen_reflect_set(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
eina_strbuf_append(buf, " goto end;\n");
eina_strbuf_append(buf, " }\n");
- Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET, EINA_FALSE);
+ Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET);
eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn);
eina_stringshare_del(fcn);
@@ -449,8 +449,7 @@ _emit_class_function(Eina_Strbuf *buf, const Eolian_Function *fid, const Eolian_
static void
_gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
Eolian_Function_Type ftype, Eina_Strbuf *buf,
- const Eolian_Implement *impl, Eina_Strbuf *lbuf,
- Eina_Hash *refh)
+ const Eolian_Implement *impl, Eina_Hash *refh)
{
Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype);
Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype);
@@ -819,7 +818,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
{
//we have owned parameters we need to take care of
eina_strbuf_append_printf(buf, "static void\n");
- eina_strbuf_append_printf(buf, "_%s_ownership_fallback(%s)\n{\n", eolian_function_full_c_name_get(fid, ftype, EINA_FALSE), eina_strbuf_string_get(params_full) + 2);
+ eina_strbuf_append_printf(buf, "_%s_ownership_fallback(%s)\n{\n", eolian_function_full_c_name_get(fid, ftype), eina_strbuf_string_get(params_full) + 2);
eina_strbuf_append_buffer(buf, fallback_free_ownership);
eina_strbuf_append_printf(buf, "}\n\n");
@@ -842,7 +841,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append_char(buf, '(');
- Eina_Stringshare *eofn = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE);
+ Eina_Stringshare *eofn = eolian_function_full_c_name_get(fid, ftype);
eina_strbuf_append(buf, eofn);
if (strcmp(rtpn, "void"))
@@ -852,7 +851,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
}
if (fallback_free_ownership)
- eina_strbuf_append_printf(buf, ", _%s_ownership_fallback(%s);", eolian_function_full_c_name_get(fid, ftype, EINA_FALSE), eina_strbuf_string_get(params));
+ eina_strbuf_append_printf(buf, ", _%s_ownership_fallback(%s);", eolian_function_full_c_name_get(fid, ftype), eina_strbuf_string_get(params));
if (has_params)
{
@@ -864,59 +863,10 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append(buf, ");\n");
- /* now try legacy */
- Eina_Stringshare *lfn = eolian_function_full_c_name_get(fid, ftype, EINA_TRUE);
- if (!eolian_function_is_beta(fid) && lfn)
- {
- eina_strbuf_append(lbuf, "\nEAPI ");
- eina_strbuf_append(lbuf, rtpn);
- eina_strbuf_append_char(lbuf, '\n');
- eina_strbuf_append(lbuf, lfn);
- /* param list */
- eina_strbuf_append_char(lbuf, '(');
- /* for class funcs, offset the params to remove comma */
- int poff = 2;
- if (!eolian_function_is_class(fid))
- {
- /* non-class funcs have the obj though */
- poff = 0;
- if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
- eina_strbuf_append(lbuf, "const ");
- eina_strbuf_append_printf(lbuf, "%s *obj", cname);
- }
- eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full) + poff);
- eina_strbuf_append(lbuf, ")\n{\n");
- /* body */
- if (strcmp(rtpn, "void"))
- eina_strbuf_append(lbuf, " return ");
- else
- eina_strbuf_append(lbuf, " ");
- eina_strbuf_append(lbuf, eofn);
- eina_strbuf_append_char(lbuf, '(');
- if (!eolian_function_is_class(fid))
- eina_strbuf_append(lbuf, "obj");
- else
- {
- Eina_Stringshare *mname = eolian_class_c_name_get(cl);
- eina_strbuf_append(lbuf, mname);
- eina_stringshare_del(mname);
- }
- if (has_params)
- eina_strbuf_append_printf(lbuf, ", %s", eina_strbuf_string_get(params));
- eina_strbuf_append(lbuf, ");\n}\n");
- }
-
- eina_stringshare_del(lfn);
eina_stringshare_del(eofn);
}
if (impl_same_class && eolian_function_is_class(fid))
- {
- const char *legacy_name = eolian_function_full_c_name_get(fid, ftype, EINA_TRUE);
-
- _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype, EINA_FALSE));
- if (legacy_name)
- _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, legacy_name);
- }
+ _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype));
free(cname);
free(cnamel);
@@ -937,7 +887,7 @@ _gen_opfunc(const Eolian_Function *fid, Eolian_Function_Type ftype,
Eina_Strbuf *buf, const Eolian_Implement *impl, Eina_Bool pinit,
const char *cnamel, const char *ocnamel)
{
- Eina_Stringshare *fnm = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE);
+ Eina_Stringshare *fnm = eolian_function_full_c_name_get(fid, ftype);
eina_strbuf_append(buf, " EFL_OBJECT_OP_FUNC(");
eina_strbuf_append(buf, fnm);
eina_strbuf_append(buf, ", ");
@@ -1086,8 +1036,7 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh)
}
void
-eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf,
- const char *lfname)
+eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
{
if (!cl)
return;
@@ -1135,14 +1084,14 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf,
{
case EOLIAN_PROP_GET:
case EOLIAN_PROP_SET:
- _gen_func(cl, fid, ftype, buf, imp, lbuf, refh);
+ _gen_func(cl, fid, ftype, buf, imp, refh);
break;
case EOLIAN_PROPERTY:
- _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf, refh);
- _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf, refh);
+ _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, refh);
+ _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, refh);
break;
default:
- _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf, refh);
+ _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, refh);
}
}
eina_iterator_free(itr);
@@ -1230,10 +1179,6 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf,
/* terminate inherits */
eina_strbuf_append(buf, ", NULL);\n");
- /* append legacy include if there */
- if (eina_strbuf_length_get(lbuf))
- eina_strbuf_append_printf(buf, "\n#include \"%s\"\n", lfname);
-
/* and we're done */
free(cnamel);
eina_hash_free(_funcs_params_init_get);
@@ -1395,7 +1340,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
if (strlen(efname) >= (sizeof("destructor") - 1) && !impl_same_class)
if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, "destructor"))
{
- Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE);
+ Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype);
Eina_Stringshare *mname = eolian_class_c_name_get(cl);
eina_strbuf_append(buf, " ");
eina_strbuf_append(buf, fcn);
diff --git a/src/bin/eolian/sources.h b/src/bin/eolian/sources.h
index 04d6988a0e..05d711458b 100644
--- a/src/bin/eolian/sources.h
+++ b/src/bin/eolian/sources.h
@@ -3,7 +3,7 @@
#include "main.h"
-void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, const char *lfname);
+void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
void eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
#endif
diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh
index 764ecb8f36..bb746ffe9a 100644
--- a/src/bin/eolian_mono/eolian/mono/documentation.hh
+++ b/src/bin/eolian_mono/eolian/mono/documentation.hh
@@ -50,7 +50,7 @@ struct documentation_generator
{
case ::EOLIAN_METHOD:
if (blacklist::is_function_blacklisted(
- ::eolian_function_full_c_name_get(function, ftype, EINA_FALSE))) return "";
+ ::eolian_function_full_c_name_get(function, ftype))) return "";
name += ".";
name += name_helpers::managed_method_name(
::eolian_object_short_name_get(klass), eo_name);
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index e869950c94..4d17e4790d 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -335,7 +335,6 @@ ffi.cdef [[
Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass);
- const char *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
const char *eolian_class_eo_prefix_get(const Eolian_Class *klass);
const char *eolian_class_data_type_get(const Eolian_Class *klass);
const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass);
@@ -343,11 +342,9 @@ ffi.cdef [[
Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id);
Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
- const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy);
+ const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
- const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
- Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass);
Eina_Bool eolian_function_is_function_pointer(const Eolian_Function *function_id);
@@ -1066,28 +1063,18 @@ M.Function = ffi.metatype("Eolian_Function", {
return tonumber(eolian.eolian_function_scope_get(self, ftype))
end,
- full_c_name_get = function(self, ftype, use_legacy)
- local v = eolian.eolian_function_full_c_name_get(self, ftype, use_legacy or false)
+ full_c_name_get = function(self, ftype)
+ local v = eolian.eolian_function_full_c_name_get(self, ftype)
if v == nil then return nil end
return ffi_stringshare(v)
end,
- legacy_get = function(self, ftype)
- local v = eolian.eolian_function_legacy_get(self, ftype)
- if v == nil then return nil end
- return ffi.string(v)
- end,
-
implement_get = function(self)
local v = eolian.eolian_function_implement_get(self)
if v == nil then return nil end
return v
end,
- is_legacy_only = function(self, ftype)
- return eolian.eolian_function_is_legacy_only(self, ftype) ~= 0
- end,
-
is_class = function(self)
return eolian.eolian_function_is_class(self) ~= 0
end,
@@ -1318,12 +1305,6 @@ M.Class = ffi.metatype("Eolian_Class", {
return v
end,
- legacy_prefix_get = function(self)
- local v = eolian.eolian_class_legacy_prefix_get(self)
- if v == nil then return nil end
- return ffi.string(v)
- end,
-
eo_prefix_get = function(self)
local v = eolian.eolian_class_eo_prefix_get(self)
if v == nil then
diff --git a/src/examples/eolian_cxx/ns_colourable.eo b/src/examples/eolian_cxx/ns_colourable.eo
index 8fce408cf6..977dc4f3fc 100644
--- a/src/examples/eolian_cxx/ns_colourable.eo
+++ b/src/examples/eolian_cxx/ns_colourable.eo
@@ -5,7 +5,6 @@ class Ns.Colourable extends Efl.Object
methods {
rgb_24bits_constructor {
[[RGB Constructor.]]
- legacy: null;
params {
@in rgb: int; [[24-bit RGB Component.]]
}
diff --git a/src/examples/eolian_cxx/ns_colourablesquare.eo b/src/examples/eolian_cxx/ns_colourablesquare.eo
index 733701f705..7ebc260798 100644
--- a/src/examples/eolian_cxx/ns_colourablesquare.eo
+++ b/src/examples/eolian_cxx/ns_colourablesquare.eo
@@ -14,7 +14,6 @@ class Ns.ColourableSquare extends Ns.Colourable
}
}
size_constructor {
- legacy: null;
params {
@in size: int;
}
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 77a5c1843a..20979ec99b 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1421,16 +1421,6 @@ EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
EAPI const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass);
/*
- * @brief Returns the legacy prefix of a class
- *
- * @param[in] klass the class
- * @return the legacy prefix
- *
- * @ingroup Eolian
- */
-EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
-
-/*
* @brief Returns the eo prefix of a class
*
* @param[in] klass the class
@@ -1559,22 +1549,20 @@ eolian_function_name_get(const Eolian_Function *fid)
*
* @param[in] function_id Id of the function
* @param[in] ftype The type of function to get the name for
- * @param[in] use_legacy If true, legacy prefix or name will be used when available
* @return the function name
*
* It's here because the C API names are deduplicated (prefix of function and
* suffix of prefix merge if applicable) and this helps generators not write
* the same code over and over.
*
- * If legacy name is supplied for the given type and use_legacy is set, it
- * will be used. Also, if the given type is PROP_GET or PROPERTY, a "_get"
- * suffix will be applied when not using legacy name, and "_set" for PROP_SET.
+ * If the given type is PROP_GET or PROPERTY, a "_get" suffix will be applied,
+ * and "_set" for PROP_SET.
*
* Also, you're responsible for deleting the stringshare.
*
* @ingroup Eolian
*/
-EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy);
+EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
/*
* @brief Get a function in a class by its name and type
@@ -1593,19 +1581,6 @@ EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *fu
EAPI const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
/*
- * @brief Returns a legacy name for a function.
- *
- * @param[in] function_id Id of the function
- * @param[in] f_type The function type, for property get/set distinction.
- * @return the legacy name or NULL.
- *
- * Acceptable input types are METHOD, PROP_GET and PROP_SET.
- *
- * @ingroup Eolian
- */
-EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
-
-/*
* @brief Returns the implement for a function.
*
* @param[in] function_id Id of the function
@@ -1616,19 +1591,6 @@ EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *functio
EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
/*
- * @brief Indicates if a function is legacy only.
- *
- * @param[in] function_id Id of the function
- * @param[in] f_type The function type, for property get/set distinction.
- * @return EINA_TRUE if legacy only, EINA_FALSE otherwise.
- *
- * Acceptable input types are METHOD, PROP_GET and PROP_SET.
- *
- * @ingroup Eolian
- */
-EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
-
-/*
* @brief Get whether a function is a class method/property.
*
* @param[in] function_id Id of the function
diff --git a/src/lib/eolian/database_class.c b/src/lib/eolian/database_class.c
index a28d36b42e..34551d3c80 100644
--- a/src/lib/eolian/database_class.c
+++ b/src/lib/eolian/database_class.c
@@ -33,7 +33,6 @@ database_class_del(Eolian_Class *cl)
eina_list_free(cl->callables);
eina_list_free(cl->composite);
- if (cl->legacy_prefix) eina_stringshare_del(cl->legacy_prefix);
if (cl->eo_prefix) eina_stringshare_del(cl->eo_prefix);
if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix);
if (cl->data_type) eina_stringshare_del(cl->data_type);
diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c
index f79cdb800b..fa7d36b541 100644
--- a/src/lib/eolian/database_class_api.c
+++ b/src/lib/eolian/database_class_api.c
@@ -21,13 +21,6 @@ eolian_class_documentation_get(const Eolian_Class *cl)
}
EAPI Eina_Stringshare*
-eolian_class_legacy_prefix_get(const Eolian_Class *cl)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
- return cl->legacy_prefix;
-}
-
-EAPI Eina_Stringshare*
eolian_class_eo_prefix_get(const Eolian_Class *cl)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
diff --git a/src/lib/eolian/database_function.c b/src/lib/eolian/database_function.c
index 15187e93d7..c3b45d3954 100644
--- a/src/lib/eolian/database_function.c
+++ b/src/lib/eolian/database_function.c
@@ -25,8 +25,6 @@ database_function_del(Eolian_Function *fid)
database_type_del(fid->set_ret_type);
database_expr_del(fid->get_ret_val);
database_expr_del(fid->set_ret_val);
- if (fid->get_legacy) eina_stringshare_del(fid->get_legacy);
- if (fid->set_legacy) eina_stringshare_del(fid->set_legacy);
database_doc_del(fid->get_return_doc);
database_doc_del(fid->set_return_doc);
free(fid);
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index 9e7135b96e..8a38443359 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -38,12 +38,10 @@ eolian_function_type_get(const Eolian_Function *fid)
}
static const char *
-_get_eo_prefix(const Eolian_Function *foo_id, char *buf, Eina_Bool use_legacy)
+_get_eo_prefix(const Eolian_Function *foo_id, char *buf)
{
char *tmp = buf;
- if (use_legacy)
- return foo_id->klass->legacy_prefix;
- else if (foo_id->klass->eo_prefix)
+ if (foo_id->klass->eo_prefix)
return foo_id->klass->eo_prefix;
strcpy(buf, foo_id->klass->base.name);
eina_str_tolower(&buf);
@@ -86,36 +84,11 @@ _get_abbreviated_name(const char *prefix, const char *fname)
EAPI Eina_Stringshare *
eolian_function_full_c_name_get(const Eolian_Function *foo_id,
- Eolian_Function_Type ftype,
- Eina_Bool use_legacy)
+ Eolian_Function_Type ftype)
{
- switch (ftype)
- {
- case EOLIAN_UNRESOLVED:
- case EOLIAN_METHOD:
- case EOLIAN_PROPERTY:
- case EOLIAN_PROP_GET:
- case EOLIAN_FUNCTION_POINTER:
- if (foo_id->get_legacy && use_legacy)
- {
- if (!strcmp(foo_id->get_legacy, "null"))
- return NULL;
- return eina_stringshare_ref(foo_id->get_legacy);
- }
- break;
- case EOLIAN_PROP_SET:
- if (foo_id->set_legacy && use_legacy)
- {
- if (!strcmp(foo_id->set_legacy, "null"))
- return NULL;
- return eina_stringshare_ref(foo_id->set_legacy);
- }
- break;
- }
-
char tbuf[512];
tbuf[0] = '\0';
- const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf, use_legacy): tbuf;
+ const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf): tbuf;
if (!prefix)
return NULL;
@@ -124,22 +97,6 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id,
Eina_Strbuf *buf = eina_strbuf_new();
Eina_Stringshare *ret;
- if (use_legacy)
- {
- eina_strbuf_append(buf, prefix);
- eina_strbuf_append_char(buf, '_');
- eina_strbuf_append(buf, funcn);
-
- if ((ftype == EOLIAN_PROP_GET) || (ftype == EOLIAN_PROPERTY))
- eina_strbuf_append(buf, "_get");
- else if (ftype == EOLIAN_PROP_SET)
- eina_strbuf_append(buf, "_set");
-
- ret = eina_stringshare_add(eina_strbuf_string_get(buf));
- eina_strbuf_free(buf);
- return ret;
- }
-
char *abbr = _get_abbreviated_name(prefix, funcn);
eina_strbuf_append(buf, abbr);
free(abbr);
@@ -154,31 +111,6 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id,
return ret;
}
-EAPI Eina_Stringshare *
-eolian_function_legacy_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
- switch (ftype)
- {
- case EOLIAN_METHOD:
- if (fid->type != EOLIAN_METHOD)
- return NULL;
- return fid->get_legacy;
- case EOLIAN_PROP_GET:
- if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
- return NULL;
- return fid->get_legacy;
- case EOLIAN_PROP_SET:
- if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
- return NULL;
- return fid->set_legacy;
- default:
- return NULL;
- }
-}
-
EAPI const Eolian_Implement *
eolian_function_implement_get(const Eolian_Function *fid)
{
@@ -187,31 +119,6 @@ eolian_function_implement_get(const Eolian_Function *fid)
}
EAPI Eina_Bool
-eolian_function_is_legacy_only(const Eolian_Function *fid, Eolian_Function_Type ftype)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
- switch (ftype)
- {
- case EOLIAN_METHOD:
- if (fid->type != EOLIAN_METHOD)
- return EINA_FALSE;
- return fid->get_only_legacy;
- case EOLIAN_PROP_GET:
- if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
- return EINA_FALSE;
- return fid->get_only_legacy;
- case EOLIAN_PROP_SET:
- if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
- return EINA_FALSE;
- return fid->set_only_legacy;
- default:
- return EINA_FALSE;
- }
-}
-
-EAPI Eina_Bool
eolian_function_is_class(const Eolian_Function *fid)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 79343a39d4..529617e348 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -26,7 +26,6 @@ database_typedecl_del(Eolian_Typedecl *tp)
database_type_del(tp->base_type);
if (tp->fields) eina_hash_free(tp->fields);
if (tp->field_list) eina_list_free(tp->field_list);
- if (tp->legacy) eina_stringshare_del(tp->legacy);
if (tp->freefunc) eina_stringshare_del(tp->freefunc);
database_doc_del(tp->doc);
free(tp);
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 665f095817..e4ebce0b40 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -247,7 +247,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
return EINA_FALSE;
}
- if (tp->is_ptr && !tp->legacy)
+ if (tp->is_ptr)
{
tp->is_ptr = EINA_FALSE;
Eina_Bool still_ownable = database_type_is_ownable(src, tp, EINA_FALSE);
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index dc8d171b02..90a79c2158 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -25,9 +25,9 @@ enum Tokens
#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
\
KW(abstract), KW(composite), KW(constructor), KW(constructors), KW(data), \
- KW(destructor), KW(eo), KW(eo_prefix), KW(event_prefix), KW(events), \
+ KW(destructor), KW(eo_prefix), KW(event_prefix), KW(events), \
KW(extends), KW(free), KW(get), KW(implements), KW(import), KW(interface), \
- KW(keys), KW(legacy), KW(legacy_prefix), KW(methods), KW(mixin), KW(params), \
+ KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \
\
KWAT(auto), KWAT(beta), KWAT(class), KWAT(const), KWAT(cref), KWAT(empty), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 6de91efc15..716cec6497 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -631,19 +631,6 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
check_match(ls, ')', '(', pline, pcol);
return def;
}
- case KW_legacy:
- {
- int pline, pcol;
- eo_lexer_get(ls);
- pline = ls->line_number;
- pcol = ls->column;
- check_next(ls, '(');
- def = parse_type_void(ls, allow_ptr);
- FILL_BASE(def->base, ls, line, col, TYPE);
- def->legacy = EINA_TRUE;
- check_match(ls, ')', '(', pline, pcol);
- return def;
- }
case KW_free:
{
int pline, pcolumn;
@@ -984,17 +971,6 @@ end:
}
static void
-parse_legacy(Eo_Lexer *ls, const char **out)
-{
- eo_lexer_get(ls);
- check_next(ls, ':');
- check(ls, TOK_VALUE);
- *out = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- check_next(ls, ';');
-}
-
-static void
parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
Eina_Bool is_vals)
{
@@ -1018,7 +994,7 @@ static void
parse_accessor(Eo_Lexer *ls, Eolian_Function *prop)
{
int line, col;
- Eina_Bool has_return = EINA_FALSE, has_legacy = EINA_FALSE,
+ Eina_Bool has_return = EINA_FALSE,
has_eo = EINA_FALSE, has_keys = EINA_FALSE,
has_values = EINA_FALSE, has_protected = EINA_FALSE,
has_virtp = EINA_FALSE;
@@ -1113,24 +1089,6 @@ parse_accessor:
prop->set_ret_type->owned = ret.owned;
}
break;
- case KW_legacy:
- CASE_LOCK(ls, legacy, "legacy name")
- if (is_get)
- parse_legacy(ls, &prop->get_legacy);
- else
- parse_legacy(ls, &prop->set_legacy);
- break;
- case KW_eo:
- CASE_LOCK(ls, eo, "eo name")
- eo_lexer_get(ls);
- check_next(ls, ':');
- check_kw_next(ls, KW_null);
- check_next(ls, ';');
- if (is_get)
- prop->get_only_legacy = EINA_TRUE;
- else
- prop->set_only_legacy = EINA_TRUE;
- break;
case KW_keys:
{
Eina_List **stor;
@@ -1352,7 +1310,7 @@ parse_method(Eo_Lexer *ls)
Eolian_Function *meth = NULL;
Eolian_Implement *impl = NULL;
Eina_Bool has_const = EINA_FALSE, has_params = EINA_FALSE,
- has_return = EINA_FALSE, has_legacy = EINA_FALSE,
+ has_return = EINA_FALSE,
has_protected = EINA_FALSE, has_class = EINA_FALSE,
has_eo = EINA_FALSE, has_beta = EINA_FALSE,
has_virtp = EINA_FALSE;
@@ -1428,18 +1386,6 @@ body:
meth->get_return_warn_unused = ret.warn_unused;
meth->get_ret_type->owned = ret.owned;
break;
- case KW_legacy:
- CASE_LOCK(ls, legacy, "legacy name")
- parse_legacy(ls, &meth->get_legacy);
- break;
- case KW_eo:
- CASE_LOCK(ls, eo, "eo name")
- eo_lexer_get(ls);
- check_next(ls, ':');
- check_kw_next(ls, KW_null);
- check_next(ls, ';');
- meth->get_only_legacy = EINA_TRUE;
- break;
case KW_params:
CASE_LOCK(ls, params, "params definition")
parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE);
@@ -1921,8 +1867,7 @@ error:
static void
parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type)
{
- Eina_Bool has_legacy_prefix = EINA_FALSE,
- has_eo_prefix = EINA_FALSE,
+ Eina_Bool has_eo_prefix = EINA_FALSE,
has_event_prefix = EINA_FALSE,
has_data = EINA_FALSE,
has_methods = EINA_FALSE,
@@ -1938,15 +1883,6 @@ parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type)
}
for (;;) switch (ls->t.kw)
{
- case KW_legacy_prefix:
- CASE_LOCK(ls, legacy_prefix, "legacy prefix definition")
- eo_lexer_get(ls);
- check_next(ls, ':');
- _validate_pfx(ls);
- ls->klass->legacy_prefix = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- check_next(ls, ';');
- break;
case KW_eo_prefix:
CASE_LOCK(ls, eo_prefix, "eo prefix definition")
eo_lexer_get(ls);
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 058da20dd8..8c1b02bd2a 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -177,7 +177,6 @@ struct _Eolian_Class
Eolian_Object base;
Eolian_Class_Type type;
Eolian_Documentation *doc;
- Eina_Stringshare *legacy_prefix;
Eina_Stringshare *eo_prefix;
Eina_Stringshare *ev_prefix;
Eina_Stringshare *data_type;
@@ -222,15 +221,11 @@ struct _Eolian_Function
Eolian_Expression *get_ret_val;
Eolian_Expression *set_ret_val;
Eolian_Implement *impl;
- Eina_Stringshare *get_legacy;
- Eina_Stringshare *set_legacy;
Eolian_Documentation *get_return_doc;
Eolian_Documentation *set_return_doc;
Eina_Bool obj_is_const :1; /* True if the object has to be const. Useful for a few methods. */
Eina_Bool get_return_warn_unused :1; /* also used for methods */
Eina_Bool set_return_warn_unused :1;
- Eina_Bool get_only_legacy: 1;
- Eina_Bool set_only_legacy: 1;
Eina_Bool is_class :1;
Eina_List *ctor_of;
Eolian_Class *klass;
@@ -276,7 +271,6 @@ struct _Eolian_Type
Eina_Bool is_const :1;
Eina_Bool is_ptr :1;
Eina_Bool owned :1;
- Eina_Bool legacy :1;
};
struct _Eolian_Typedecl
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 9969e89075..42b720d05d 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -757,7 +757,7 @@ struct function_def
else
parameters.insert(parameters.end(), values.begin(), values.end());
}
- c_name = eolian_function_full_c_name_get(function, type, EINA_FALSE);
+ c_name = eolian_function_full_c_name_get(function, type);
if (type != EOLIAN_FUNCTION_POINTER)
{
const Eolian_Class *eolian_klass = eolian_function_class_get(function);
@@ -1253,8 +1253,7 @@ struct klass_def
efl::eina::optional<function_def> getter(nullptr);
efl::eina::optional<function_def> setter(nullptr);
try {
- if(! ::eolian_function_is_legacy_only(function, EOLIAN_PROP_GET)
- && ::eolian_function_scope_get(function, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PRIVATE)
+ if(::eolian_function_scope_get(function, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PRIVATE)
{
function_def f(function, EOLIAN_PROP_GET, NULL, unit);
functions.push_back(f);
@@ -1262,8 +1261,7 @@ struct klass_def
}
} catch(std::exception const&) {}
try {
- if(! ::eolian_function_is_legacy_only(function, EOLIAN_PROP_SET)
- && ::eolian_function_scope_get(function, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PRIVATE)
+ if(::eolian_function_scope_get(function, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PRIVATE)
{
function_def f(function, EOLIAN_PROP_SET, NULL, unit);
functions.push_back(f);
@@ -1275,8 +1273,7 @@ struct klass_def
}
else
try {
- if(! ::eolian_function_is_legacy_only(function, func_type)
- && ::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
+ if(::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
{
efl::eina::optional<function_def> getter(nullptr);
efl::eina::optional<function_def> setter(nullptr);
@@ -1297,8 +1294,7 @@ struct klass_def
try {
Eolian_Function const* function = &*eolian_functions;
Eolian_Function_Type func_type = eolian_function_type_get(function);
- if(! ::eolian_function_is_legacy_only(function, EOLIAN_METHOD)
- && ::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
+ if(::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
functions.push_back({function, EOLIAN_METHOD, NULL, unit});
} catch(std::exception const&) {}
}
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index a2a6b5c323..70ab733ce5 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -661,10 +661,6 @@ class Class(Object):
return ret
@cached_property
- def legacy_prefix(self):
- return _str_to_py(lib.eolian_class_legacy_prefix_get(self))
-
- @cached_property
def eo_prefix(self):
return _str_to_py(lib.eolian_class_eo_prefix_get(self))
@@ -827,8 +823,8 @@ class Function(Object):
def __repr__(self):
return "<eolian.Function '{0.name}'>".format(self)
- def full_c_name_get(self, ftype, use_legacy=False):
- s = lib.eolian_function_full_c_name_get(self, ftype, use_legacy)
+ def full_c_name_get(self, ftype):
+ s = lib.eolian_function_full_c_name_get(self, ftype)
ret = _str_to_py(s)
lib.eina_stringshare_del(c_void_p(s))
return ret
@@ -846,18 +842,6 @@ class Function(Object):
return self.full_c_name_get(Eolian_Function_Type.PROP_SET)
@cached_property
- def full_c_method_name_legacy(self):
- return self.full_c_name_get(Eolian_Function_Type.METHOD, True)
-
- @cached_property
- def full_c_getter_name_legacy(self):
- return self.full_c_name_get(Eolian_Function_Type.PROP_GET, True)
-
- @cached_property
- def full_c_setter_name_legacy(self):
- return self.full_c_name_get(Eolian_Function_Type.PROP_SET, True)
-
- @cached_property
def type(self):
return Eolian_Function_Type(lib.eolian_function_type_get(self))
@@ -876,12 +860,6 @@ class Function(Object):
def setter_scope(self):
return self.scope_get(Eolian_Function_Type.PROP_SET)
- def legacy_get(self, ftype):
- return _str_to_py(lib.eolian_function_legacy_get(self, ftype))
-
- def is_legacy_only(self, ftype):
- return bool(lib.eolian_function_is_legacy_only(self, ftype))
-
@cached_property
def is_class(self):
return bool(lib.eolian_function_is_class(self))
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index 9389683123..9edebd0199 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -242,10 +242,6 @@ lib.eolian_class_type_get.restype = c_int
lib.eolian_class_documentation_get.argtypes = (c_void_p,)
lib.eolian_class_documentation_get.restype = c_void_p
-# EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
-lib.eolian_class_legacy_prefix_get.argtypes = (c_void_p,)
-lib.eolian_class_legacy_prefix_get.restype = c_char_p
-
# EAPI Eina_Stringshare *eolian_class_eo_prefix_get(const Eolian_Class *klass);
lib.eolian_class_eo_prefix_get.argtypes = (c_void_p,)
lib.eolian_class_eo_prefix_get.restype = c_char_p
@@ -324,22 +320,14 @@ lib.eolian_function_type_get.restype = c_int
lib.eolian_function_scope_get.argtypes = (c_void_p, c_int)
lib.eolian_function_scope_get.restype = c_int
-# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy);
-lib.eolian_function_full_c_name_get.argtypes = (c_void_p, c_int, c_bool)
+# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
+lib.eolian_function_full_c_name_get.argtypes = (c_void_p, c_int)
lib.eolian_function_full_c_name_get.restype = c_void_p # Stringshare TO BE FREED
-# EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
-lib.eolian_function_legacy_get.argtypes = (c_void_p, c_int)
-lib.eolian_function_legacy_get.restype = c_char_p
-
# EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
lib.eolian_function_implement_get.argtypes = (c_void_p,)
lib.eolian_function_implement_get.restype = c_void_p
-# EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
-lib.eolian_function_is_legacy_only.argtypes = (c_void_p, c_int)
-lib.eolian_function_is_legacy_only.restype = c_bool
-
# EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
lib.eolian_function_is_class.argtypes = (c_void_p,)
lib.eolian_function_is_class.restype = c_bool
diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo
index 6d9e59ddd7..0a89c5eea7 100644
--- a/src/tests/eolian/data/class_simple.eo
+++ b/src/tests/eolian/data/class_simple.eo
@@ -8,7 +8,6 @@ var @extern Bah: double; // not generated
class Class_Simple {
[[Class Desc Simple]]
- legacy_prefix: evas_object_simple;
eo_prefix: efl_canvas_object_simple;
data: Evas_Simple_Data;
methods {
@@ -24,11 +23,6 @@ class Class_Simple {
value: int (100); [[Value description]]
}
}
- @property b {
- set {
- eo: null;
- }
- }
foo @beta {
[[comment foo]]
params {
@@ -39,12 +33,5 @@ class Class_Simple {
}
return: ptr(char) (null); [[comment for method return]]
}
- bar {
- eo: null;
- params {
- x: int;
- }
- return: ptr(int);
- }
}
}
diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c
index 5d1af350e6..46b4dda8f1 100644
--- a/src/tests/eolian/data/class_simple_ref.c
+++ b/src/tests/eolian/data/class_simple_ref.c
@@ -32,10 +32,6 @@ __eolian_class_simple_a_get_reflect(Eo *obj)
EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_simple_a_get, int, 100);
-void _class_simple_b_set(Eo *obj, Evas_Simple_Data *pd);
-
-EOAPI EFL_VOID_FUNC_BODY(efl_canvas_object_simple_b_set);
-
char *_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d);
static char *__eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d)
@@ -46,10 +42,6 @@ static char *__eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, cha
EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_foo, char *, NULL /* null */, EFL_FUNC_CALL(a, b, c, d), int a, char *b, double *c, int *d);
-int *_class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x);
-
-EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_bar, int *, NULL, EFL_FUNC_CALL(x), int x);
-
static Eina_Bool
_class_simple_class_initializer(Efl_Class *klass)
{
@@ -64,9 +56,7 @@ _class_simple_class_initializer(Efl_Class *klass)
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_set, _class_simple_a_set),
EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_get, _class_simple_a_get),
- EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_b_set, _class_simple_b_set),
EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_foo, __eolian_class_simple_foo),
- EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_bar, _class_simple_bar),
CLASS_SIMPLE_EXTRA_OPS
);
opsp = &ops;
@@ -93,5 +83,3 @@ static const Efl_Class_Description _class_simple_class_desc = {
};
EFL_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL);
-
-#include "eolian_class_simple.eo.legacy.c"
diff --git a/src/tests/eolian/data/class_simple_ref.legacy.c b/src/tests/eolian/data/class_simple_ref.legacy.c
deleted file mode 100644
index b0f922864a..0000000000
--- a/src/tests/eolian/data/class_simple_ref.legacy.c
+++ /dev/null
@@ -1,12 +0,0 @@
-
-EAPI void
-evas_object_simple_b_set(Class_Simple *obj)
-{
- efl_canvas_object_simple_b_set(obj);
-}
-
-EAPI int *
-evas_object_simple_bar(Class_Simple *obj, int x)
-{
- return efl_canvas_object_simple_bar(obj, x);
-}
diff --git a/src/tests/eolian/data/class_simple_ref_eo.h b/src/tests/eolian/data/class_simple_ref_eo.h
index 1b63422e7b..60e6fe27e2 100644
--- a/src/tests/eolian/data/class_simple_ref_eo.h
+++ b/src/tests/eolian/data/class_simple_ref_eo.h
@@ -70,8 +70,6 @@ EOAPI Eina_Bool efl_canvas_object_simple_a_set(Eo *obj, int value);
EOAPI int efl_canvas_object_simple_a_get(const Eo *obj);
#endif /* EFL_BETA_API_SUPPORT */
-EOAPI void efl_canvas_object_simple_b_set(Eo *obj);
-
#ifdef EFL_BETA_API_SUPPORT
/**
* @brief comment foo
@@ -89,6 +87,4 @@ EOAPI void efl_canvas_object_simple_b_set(Eo *obj);
EOAPI char *efl_canvas_object_simple_foo(Eo *obj, int a, char *b, double *c, int *d);
#endif /* EFL_BETA_API_SUPPORT */
-EOAPI int *efl_canvas_object_simple_bar(Eo *obj, int x);
-
#endif
diff --git a/src/tests/eolian/data/class_simple_ref_legacy.h b/src/tests/eolian/data/class_simple_ref_legacy.h
deleted file mode 100644
index 39320a4ddb..0000000000
--- a/src/tests/eolian/data/class_simple_ref_legacy.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef _EOLIAN_CLASS_SIMPLE_EO_LEGACY_H_
-#define _EOLIAN_CLASS_SIMPLE_EO_LEGACY_H_
-
-#ifndef _CLASS_SIMPLE_EO_CLASS_TYPE
-#define _CLASS_SIMPLE_EO_CLASS_TYPE
-
-typedef Eo Class_Simple;
-
-#endif
-
-#ifndef _CLASS_SIMPLE_EO_TYPES
-#define _CLASS_SIMPLE_EO_TYPES
-
-#ifndef FOO
-/** doc for constant
- *
- * @ingroup Foo
- */
-#define FOO 5
-#endif
-
-/** doc for global
- *
- * @ingroup Bar
- */
-EWAPI extern float BAR;
-
-/** in header but not in source
- *
- * @ingroup Baz
- */
-EWAPI extern long BAZ;
-
-
-#endif
-
-EAPI void evas_object_simple_b_set(Class_Simple *obj);
-
-EAPI int *evas_object_simple_bar(Class_Simple *obj, int x);
-
-#endif
diff --git a/src/tests/eolian/data/docs.eo b/src/tests/eolian/data/docs.eo
index f6bea43744..c81c6e2851 100644
--- a/src/tests/eolian/data/docs.eo
+++ b/src/tests/eolian/data/docs.eo
@@ -53,7 +53,6 @@ class Docs {
@since 1.18
]]
- legacy_prefix: docs;
methods {
meth {
[[Method documentation.]]
diff --git a/src/tests/eolian/data/docs_ref_legacy.h b/src/tests/eolian/data/docs_ref_legacy.h
deleted file mode 100644
index 8057c7aa7c..0000000000
--- a/src/tests/eolian/data/docs_ref_legacy.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#ifndef _EOLIAN_DOCS_EO_LEGACY_H_
-#define _EOLIAN_DOCS_EO_LEGACY_H_
-
-#ifndef _DOCS_EO_CLASS_TYPE
-#define _DOCS_EO_CLASS_TYPE
-
-typedef Eo Docs;
-
-#endif
-
-#ifndef _DOCS_EO_TYPES
-#define _DOCS_EO_TYPES
-
-/**
- * @brief This is struct Foo. It does stuff.
- *
- * @note This is a note.
- *
- * This is a longer description for struct Foo.
- *
- * @warning This is a warning. You can only use Warning: and Note: at the
- * beginning of a paragraph.
- *
- * This is another paragraph.
- *
- * @since 1.66
- *
- * @ingroup Foo
- */
-typedef struct _Foo
-{
- int field1; /**< Field documentation. */
- float field2;
- short field3; /**< Another field documentation. */
-} Foo;
-
-/** Docs for enum Bar.
- *
- * @ingroup Bar
- */
-typedef enum
-{
- BAR_BLAH = 0,
- BAR_FOO = 1, /**< Docs for foo. */
- BAR_BAR = 2 /**< Docs for bar. */
-} Bar;
-
-/**
- * @brief Docs for typedef.
- *
- * More docs for typedef. See @ref Bar.
- *
- * @since 2.0
- *
- * @ingroup Alias
- */
-typedef Bar Alias;
-
-/** Docs for var.
- *
- * @ingroup pants
- */
-EWAPI extern int PANTS;
-
-/** Opaque struct docs. See @ref Foo for another struct.
- *
- * @ingroup Opaque
- */
-typedef struct _Opaque Opaque;
-
-
-#endif
-
-/**
- * @brief Method documentation.
- *
- * @param[in] obj The object.
- * @param[in] a Param documentation.
- * @param[out] b
- * @param[out] c Another param documentation.
- *
- * @return Return documentation.
- *
- * @since 1.18
- *
- * @ingroup Docs_Group
- */
-EAPI int docs_meth(Docs *obj, int a, float *b, long *c);
-
-/**
- * @brief Property common documentation.
- *
- * Set documentation.
- *
- * @param[in] obj The object.
- * @param[in] val Value documentation.
- *
- * @since 1.18
- *
- * @ingroup Docs_Group
- */
-EAPI void docs_prop_set(Docs *obj, int val);
-
-/**
- * @brief Property common documentation.
- *
- * Get documentation.
- *
- * @param[in] obj The object.
- *
- * @return Value documentation.
- *
- * @since 1.18
- *
- * @ingroup Docs_Group
- */
-EAPI int docs_prop_get(const Docs *obj);
-
-#endif
diff --git a/src/tests/eolian/eolian_generation.c b/src/tests/eolian/eolian_generation.c
index 6a43f1fc23..2fe0be6267 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -141,7 +141,6 @@ EFL_START_TEST(eolian_default_values_generation)
_remove_ref(output_filepath, "eo.c");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gc", output_filepath));
fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.c", output_filepath, "eo.c"));
- fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.legacy.c", output_filepath, "eo.legacy.c"));
}
EFL_END_TEST
@@ -164,9 +163,7 @@ EFL_START_TEST(eolian_functions_descriptions)
_remove_ref(output_filepath, "eo.h");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gh", output_filepath));
fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h"));
- _remove_ref(output_filepath, "eo.legacy.h");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gl", output_filepath));
- fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_legacy.h", output_filepath, "eo.legacy.h"));
}
EFL_END_TEST
@@ -189,9 +186,7 @@ EFL_START_TEST(eolian_docs)
_remove_ref(output_filepath, "eo.h");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gh", output_filepath));
fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref.h", output_filepath, "eo.h"));
- _remove_ref(output_filepath, "eo.legacy.h");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gl", output_filepath));
- fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref_legacy.h", output_filepath, "eo.legacy.h"));
}
EFL_END_TEST
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 3d2b4dbcfe..de1a740aa5 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -563,7 +563,6 @@ EFL_START_TEST(eolian_simple_parsing)
fail_if(eolian_class_type_get(class) != EOLIAN_CLASS_REGULAR);
fail_if(eolian_class_parent_get(class) != NULL);
fail_if(eolian_class_extensions_get(class) != NULL);
- fail_if(strcmp(eolian_class_legacy_prefix_get(class), "evas_object_simple"));
fail_if(strcmp(eolian_class_eo_prefix_get(class), "efl_canvas_object_simple"));
fail_if(strcmp(eolian_class_data_type_get(class), "Evas_Simple_Data"));
Eina_Stringshare *dt = eolian_class_c_data_type_get(class);
@@ -613,13 +612,6 @@ EFL_START_TEST(eolian_simple_parsing)
fail_if(v.type != EOLIAN_EXPR_INT);
fail_if(v.value.i != 100);
- /* legacy only + c only */
- fail_if(eolian_class_function_by_name_get(class, "b", EOLIAN_PROPERTY));
- fail_if(!(fid = eolian_class_function_by_name_get(class, "b", EOLIAN_PROP_SET)));
- fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET));
- fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET));
- fail_if(eolian_function_is_beta(fid));
-
/* Method */
fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD)));
fail_if(!eolian_function_is_beta(fid));
@@ -635,7 +627,6 @@ EFL_START_TEST(eolian_simple_parsing)
fail_if(!expr);
v = eolian_expression_eval(expr, EOLIAN_MASK_NULL);
fail_if(v.type != EOLIAN_EXPR_NULL);
- fail_if(eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
/* Function parameters */
fail_if(!(iter = eolian_function_parameters_get(fid)));
@@ -666,12 +657,6 @@ EFL_START_TEST(eolian_simple_parsing)
fail_if(eina_iterator_next(iter, &dummy));
eina_iterator_free(iter);
- /* legacy only + c only */
- fail_if(!(fid = eolian_class_function_by_name_get(class, "bar", EOLIAN_METHOD)));
- fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
- fail_if(eolian_function_is_beta(fid));
- fail_if(!eolian_type_is_ptr(eolian_function_return_type_get(fid, EOLIAN_METHOD)));
-
eolian_state_free(eos);
}
EFL_END_TEST
diff --git a/src/tests/eolian_cxx/docs.eo b/src/tests/eolian_cxx/docs.eo
index 5ca93f02f2..5249b7196e 100644
--- a/src/tests/eolian_cxx/docs.eo
+++ b/src/tests/eolian_cxx/docs.eo
@@ -53,7 +53,6 @@ class Docs {
@since 1.17
]]
- legacy_prefix: docs;
methods {
meth {
[[Method documentation.]]