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)
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 \
159tests/eolian/data/struct_ref_stub.h \ 159tests/eolian/data/struct_ref_stub.h \
160tests/eolian/data/owning.eo.c \ 160tests/eolian/data/owning.eo.c \
161tests/eolian/data/class_simple_ref.c \ 161tests/eolian/data/class_simple_ref.c \
162tests/eolian/data/class_simple_ref.legacy.c \
163tests/eolian/data/override_ref.c \ 162tests/eolian/data/override_ref.c \
164tests/eolian/data/class_simple_ref_eo.h \ 163tests/eolian/data/class_simple_ref_eo.h \
165tests/eolian/data/class_simple_ref_legacy.h \
166tests/eolian/data/import_types_ref.h \ 164tests/eolian/data/import_types_ref.h \
167tests/eolian/data/docs_ref.h \ 165tests/eolian/data/docs_ref.h \
168tests/eolian/data/docs_ref_legacy.h \
169tests/eolian/data/function_types_ref.h \ 166tests/eolian/data/function_types_ref.h \
170tests/eolian/data/function_as_argument_impl_ref.c \ 167tests/eolian/data/function_as_argument_impl_ref.c \
171tests/eolian/data/function_as_argument_ref.c \ 168tests/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,
111 111
112 if (!fn) goto noref; 112 if (!fn) goto noref;
113 113
114 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype, use_legacy); 114 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype);
115 if (!fcn) goto noref; 115 if (!fcn) goto noref;
116 eina_strbuf_append(wbuf, fcn); 116 eina_strbuf_append(wbuf, fcn);
117 eina_stringshare_del(fcn); 117 eina_stringshare_del(fcn);
@@ -408,8 +408,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev,
408 408
409Eina_Strbuf * 409Eina_Strbuf *
410eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, 410eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
411 Eolian_Function_Type ftype, int indent, 411 Eolian_Function_Type ftype, int indent)
412 Eina_Bool use_legacy)
413{ 412{
414 const Eolian_Function_Parameter *par = NULL; 413 const Eolian_Function_Parameter *par = NULL;
415 const Eolian_Function_Parameter *vpar = NULL; 414 const Eolian_Function_Parameter *vpar = NULL;
@@ -427,28 +426,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
427 426
428 int curl = 0; 427 int curl = 0;
429 428
430 const char *group = NULL; 429 const char *group = eolian_class_name_get(eolian_function_class_get(fid));
431 char legacy_group_name[1024];
432 if (use_legacy)
433 {
434 // Generate legacy doxygen group name
435 const char *prefix =
436 eolian_class_legacy_prefix_get(eolian_function_class_get(fid));
437 unsigned int i;
438 snprintf(legacy_group_name, sizeof(legacy_group_name),
439 "%s_Group", prefix);
440 for (i = 0; i < strlen(legacy_group_name); i++)
441 {
442 if ((i == 0) || (legacy_group_name[i - 1] == '_'))
443 legacy_group_name[i] = toupper(legacy_group_name[i]);
444 }
445 group = legacy_group_name;
446 }
447 else
448 {
449 group = eolian_class_name_get(eolian_function_class_get(fid));
450 }
451
452 const Eolian_Implement *fimp = eolian_function_implement_get(fid); 430 const Eolian_Implement *fimp = eolian_function_implement_get(fid);
453 431
454 if (ftype == EOLIAN_METHOD) 432 if (ftype == EOLIAN_METHOD)
@@ -539,7 +517,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
539 if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc)) 517 if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc))
540 { 518 {
541 _gen_doc_brief(state, sum ? sum : "No description supplied.", since, group, 519 _gen_doc_brief(state, sum ? sum : "No description supplied.", since, group,
542 NULL, indent, buf, use_legacy); 520 NULL, indent, buf, EINA_FALSE);
543 return buf; 521 return buf;
544 } 522 }
545 523
@@ -550,7 +528,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
550 eina_strbuf_append(buf, " * @brief "); 528 eina_strbuf_append(buf, " * @brief ");
551 curl += sizeof(" * @brief ") - 1; 529 curl += sizeof(" * @brief ") - 1;
552 _append_section(state, sum ? sum : "No description supplied.", 530 _append_section(state, sum ? sum : "No description supplied.",
553 indent, curl, buf, wbuf, use_legacy); 531 indent, curl, buf, wbuf, EINA_FALSE);
554 532
555 eina_strbuf_append_char(buf, '\n'); 533 eina_strbuf_append_char(buf, '\n');
556 if (desc || since || par || rdoc || pdoc) 534 if (desc || since || par || rdoc || pdoc)
@@ -563,7 +541,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
563 { 541 {
564 curl = _indent_line(buf, indent); 542 curl = _indent_line(buf, indent);
565 eina_strbuf_append(buf, " * "); 543 eina_strbuf_append(buf, " * ");
566 _append_section(state, desc, indent, curl + 3, buf, wbuf, use_legacy); 544 _append_section(state, desc, indent, curl + 3, buf, wbuf, EINA_FALSE);
567 eina_strbuf_append_char(buf, '\n'); 545 eina_strbuf_append_char(buf, '\n');
568 if (par || rdoc || pdoc || since) 546 if (par || rdoc || pdoc || since)
569 { 547 {
@@ -578,7 +556,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
578 curl = _indent_line(buf, indent); 556 curl = _indent_line(buf, indent);
579 eina_strbuf_append(buf, " * "); 557 eina_strbuf_append(buf, " * ");
580 _append_section(state, eolian_documentation_summary_get(pdoc), indent, 558 _append_section(state, eolian_documentation_summary_get(pdoc), indent,
581 curl + 3, buf, wbuf, use_legacy); 559 curl + 3, buf, wbuf, EINA_FALSE);
582 eina_strbuf_append_char(buf, '\n'); 560 eina_strbuf_append_char(buf, '\n');
583 if (pdesc) 561 if (pdesc)
584 { 562 {
@@ -586,7 +564,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
586 eina_strbuf_append(buf, " *\n"); 564 eina_strbuf_append(buf, " *\n");
587 curl = _indent_line(buf, indent); 565 curl = _indent_line(buf, indent);
588 eina_strbuf_append(buf, " * "); 566 eina_strbuf_append(buf, " * ");
589 _append_section(state, pdesc, indent, curl + 3, buf, wbuf, use_legacy); 567 _append_section(state, pdesc, indent, curl + 3, buf, wbuf, EINA_FALSE);
590 eina_strbuf_append_char(buf, '\n'); 568 eina_strbuf_append_char(buf, '\n');
591 } 569 }
592 if (par || rdoc || since) 570 if (par || rdoc || since)
@@ -641,7 +619,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
641 eina_strbuf_append_char(buf, ' '); 619 eina_strbuf_append_char(buf, ' ');
642 curl += 1; 620 curl += 1;
643 _append_section(state, eolian_documentation_summary_get(adoc), 621 _append_section(state, eolian_documentation_summary_get(adoc),
644 indent, curl, buf, wbuf, use_legacy); 622 indent, curl, buf, wbuf, EINA_FALSE);
645 } 623 }
646 624
647 eina_strbuf_append_char(buf, '\n'); 625 eina_strbuf_append_char(buf, '\n');
@@ -674,7 +652,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
674 eina_strbuf_append(buf, " * @return "); 652 eina_strbuf_append(buf, " * @return ");
675 curl += sizeof(" * @return ") - 1; 653 curl += sizeof(" * @return ") - 1;
676 _append_section(state, eolian_documentation_summary_get(rdoc), indent, 654 _append_section(state, eolian_documentation_summary_get(rdoc), indent,
677 curl, buf, wbuf, use_legacy); 655 curl, buf, wbuf, EINA_FALSE);
678 eina_strbuf_append_char(buf, '\n'); 656 eina_strbuf_append_char(buf, '\n');
679 if (since) 657 if (since)
680 { 658 {
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
22 * @param[in] fid te function 22 * @param[in] fid te function
23 * @param[in] type the function type (either METHOD, PROP_GET, PROP_SET) 23 * @param[in] type the function type (either METHOD, PROP_GET, PROP_SET)
24 * @param[in] indent by how many spaces to indent the comment from second line 24 * @param[in] indent by how many spaces to indent the comment from second line
25 * @param[in] use_legacy whether to use legacy names
26 * 25 *
27 * @return A documentation comment 26 * @return A documentation comment
28 * 27 *
29 */ 28 */
30Eina_Strbuf *eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, Eolian_Function_Type ftype, int indent, Eina_Bool use_legacy); 29Eina_Strbuf *eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, Eolian_Function_Type ftype, int indent);
31 30
32/* 31/*
33 * @brief Generate event documentation 32 * @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,
67 67
68static void 68static void
69_gen_func(const Eolian_State *state, const Eolian_Function *fid, 69_gen_func(const Eolian_State *state, const Eolian_Function *fid,
70 Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cname, 70 Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cnameu)
71 char *cnameu, Eina_Bool legacy)
72{ 71{
73 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, legacy); 72 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype);
74 if (!fcn) 73 if (!fcn)
75 return; 74 return;
76 75
@@ -90,11 +89,9 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
90 89
91 Eolian_Object_Scope fsc = eolian_function_scope_get(fid, ftype); 90 Eolian_Object_Scope fsc = eolian_function_scope_get(fid, ftype);
92 91
93 /* this one will never be satisfied in legacy */
94 if (eolian_function_is_beta(fid)) 92 if (eolian_function_is_beta(fid))
95 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); 93 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
96 /* XXX: is this right? we expose potentially internal stuff into legacy */ 94 if (fsc == EOLIAN_SCOPE_PROTECTED)
97 if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
98 eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu); 95 eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
99 96
100 const Eolian_Implement *fimp = eolian_function_implement_get(fid); 97 const Eolian_Implement *fimp = eolian_function_implement_get(fid);
@@ -104,12 +101,12 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
104 hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY); 101 hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY);
105 if (hasdoc) 102 if (hasdoc)
106 { 103 {
107 Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0, legacy); 104 Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0);
108 eina_strbuf_append(buf, eina_strbuf_string_get(dbuf)); 105 eina_strbuf_append(buf, eina_strbuf_string_get(dbuf));
109 eina_strbuf_append_char(buf, '\n'); 106 eina_strbuf_append_char(buf, '\n');
110 eina_strbuf_free(dbuf); 107 eina_strbuf_free(dbuf);
111 } 108 }
112 eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI "); 109 eina_strbuf_append(buf, "EOAPI ");
113 if (rtp) 110 if (rtp)
114 { 111 {
115 Eina_Stringshare *rtps = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN); 112 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,
135 { 132 {
136 eina_strbuf_append(buf, "const "); 133 eina_strbuf_append(buf, "const ");
137 } 134 }
138 if (legacy) 135 eina_strbuf_append(buf, "Eo *obj");
139 eina_strbuf_append_printf(buf, "%s *obj", cname);
140 else
141 eina_strbuf_append(buf, "Eo *obj");
142 } 136 }
143 137
144 eo_gen_params(eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY); 138 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,
174 } 168 }
175 eina_strbuf_append(buf, ";\n"); 169 eina_strbuf_append(buf, ";\n");
176 170
177 if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) 171 if (fsc == EOLIAN_SCOPE_PROTECTED)
178 eina_strbuf_append_printf(buf, "#endif\n"); 172 eina_strbuf_append_printf(buf, "#endif\n");
179 if (eolian_function_is_beta(fid)) 173 if (eolian_function_is_beta(fid))
180 eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); 174 eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
@@ -184,129 +178,119 @@ void
184eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, 178eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
185 Eina_Strbuf *buf, Eina_Bool legacy) 179 Eina_Strbuf *buf, Eina_Bool legacy)
186{ 180{
187 if (!cl) 181 if (!cl || legacy)
188 return; 182 return;
189 183
190 char *cname = NULL, *cnameu = NULL; 184 Eina_Iterator *itr;
191 eo_gen_class_names_get(cl, &cname, &cnameu, NULL); 185 Eolian_Event *ev;
186 char *cnameu = NULL;
187 eo_gen_class_names_get(cl, NULL, &cnameu, NULL);
192 188
193 /* class definition */ 189 /* class definition */
194 190
195 if (!legacy && eolian_class_is_beta(cl)) 191 if (eolian_class_is_beta(cl))
196 { 192 {
197 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); 193 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
198 } 194 }
199 if (!legacy) 195 const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
196 if (doc)
200 { 197 {
201 const Eolian_Documentation *doc = eolian_class_documentation_get(cl); 198 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
202 if (doc) 199 eolian_class_name_get(cl), 0, EINA_FALSE);
200 if (cdoc)
203 { 201 {
204 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc, 202 eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
205 eolian_class_name_get(cl), 0, EINA_FALSE); 203 eina_strbuf_append_char(buf, '\n');
206 if (cdoc) 204 eina_strbuf_free(cdoc);
207 {
208 eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
209 eina_strbuf_append_char(buf, '\n');
210 eina_strbuf_free(cdoc);
211 }
212 } 205 }
206 }
213 207
214 Eina_Stringshare *mname = eolian_class_c_name_get(cl); 208 Eina_Stringshare *mname = eolian_class_c_name_get(cl);
215 Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl); 209 Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl);
216 eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname); 210 eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname);
217 eina_stringshare_del(mname); 211 eina_stringshare_del(mname);
218 212
219 eina_strbuf_append_printf(buf, "EWAPI const Efl_Class *%s(void);\n", gname); 213 eina_strbuf_append_printf(buf, "EWAPI const Efl_Class *%s(void);\n", gname);
220 eina_stringshare_del(gname); 214 eina_stringshare_del(gname);
221 }
222 215
223 /* method section */ 216 /* method section */
224 { 217 itr = eolian_class_implements_get(cl);
225 Eina_Iterator *itr = eolian_class_implements_get(cl); 218 if (!itr)
226 if (!itr) 219 goto events;
227 goto events; 220
228 221 const Eolian_Implement *imp;
229 const Eolian_Implement *imp; 222 EINA_ITERATOR_FOREACH(itr, imp)
230 EINA_ITERATOR_FOREACH(itr, imp) 223 {
231 { 224 if (eolian_implement_class_get(imp) != cl)
232 if (eolian_implement_class_get(imp) != cl) 225 continue;
233 continue; 226 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED;
234 Eolian_Function_Type ftype = EOLIAN_UNRESOLVED; 227 const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype);
235 const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype); 228 eina_strbuf_append_char(buf, '\n');
236 /* beta can only exist for eo api */ 229 switch (ftype)
237 if (legacy && eolian_function_is_beta(fid)) 230 {
238 continue; 231 case EOLIAN_PROP_GET:
239 eina_strbuf_append_char(buf, '\n'); 232 case EOLIAN_PROP_SET:
240 switch (ftype) 233 _gen_func(state, fid, ftype, buf, cnameu);
241 { 234 break;
242 case EOLIAN_PROP_GET: 235 case EOLIAN_PROPERTY:
243 case EOLIAN_PROP_SET: 236 _gen_func(state, fid, EOLIAN_PROP_SET, buf, cnameu);
244 _gen_func(state, fid, ftype, buf, cname, cnameu, legacy); 237 eina_strbuf_append_char(buf, '\n');
245 break; 238 _gen_func(state, fid, EOLIAN_PROP_GET, buf, cnameu);
246 case EOLIAN_PROPERTY: 239 break;
247 _gen_func(state, fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy); 240 default:
248 eina_strbuf_append_char(buf, '\n'); 241 _gen_func(state, fid, EOLIAN_METHOD, buf, cnameu);
249 _gen_func(state, fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy); 242 }
250 break; 243 }
251 default: 244 eina_iterator_free(itr);
252 _gen_func(state, fid, EOLIAN_METHOD, buf, cname, cnameu, legacy);
253 }
254 }
255 eina_iterator_free(itr);
256 }
257 245
258events: 246events:
259 /* event section */ 247 /* event section */
260 if (!legacy) 248 itr = eolian_class_events_get(cl);
249 EINA_ITERATOR_FOREACH(itr, ev)
261 { 250 {
262 Eina_Iterator *itr = eolian_class_events_get(cl); 251 Eina_Stringshare *evn = eolian_event_c_name_get(ev);
263 Eolian_Event *ev; 252 Eolian_Object_Scope evs = eolian_event_scope_get(ev);
264 EINA_ITERATOR_FOREACH(itr, ev) 253
254 if (evs == EOLIAN_SCOPE_PRIVATE)
255 continue;
256
257 if (eolian_event_is_beta(ev))
265 { 258 {
266 Eina_Stringshare *evn = eolian_event_c_name_get(ev); 259 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
267 Eolian_Object_Scope evs = eolian_event_scope_get(ev); 260 }
268 261 if (evs == EOLIAN_SCOPE_PROTECTED)
269 if (evs == EOLIAN_SCOPE_PRIVATE) 262 {
270 continue; 263 if (!eolian_event_is_beta(ev))
271
272 if (eolian_event_is_beta(ev))
273 {
274 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
275 }
276 if (evs == EOLIAN_SCOPE_PROTECTED)
277 {
278 if (!eolian_event_is_beta(ev))
279 eina_strbuf_append_char(buf, '\n');
280 eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
281 }
282
283 if (!eolian_event_is_beta(ev) && evs == EOLIAN_SCOPE_PUBLIC)
284 eina_strbuf_append_char(buf, '\n'); 264 eina_strbuf_append_char(buf, '\n');
265 eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
266 }
285 267
286 eina_strbuf_append_printf(buf, "EWAPI extern const " 268 if (!eolian_event_is_beta(ev) && evs == EOLIAN_SCOPE_PUBLIC)
287 "Efl_Event_Description _%s;\n\n", evn); 269 eina_strbuf_append_char(buf, '\n');
288 270
289 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev, 271 eina_strbuf_append_printf(buf, "EWAPI extern const "
290 eolian_class_name_get(cl)); 272 "Efl_Event_Description _%s;\n\n", evn);
291 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
292 eina_strbuf_append_char(buf, '\n');
293 eina_strbuf_free(evdbuf);
294 eina_strbuf_append_printf(buf, "#define %s (&(_%s))\n", evn, evn);
295 273
296 if (evs == EOLIAN_SCOPE_PROTECTED) 274 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
297 eina_strbuf_append(buf, "#endif\n"); 275 eolian_class_name_get(cl));
298 if (eolian_event_is_beta(ev)) 276 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
299 eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); 277 eina_strbuf_append_char(buf, '\n');
278 eina_strbuf_free(evdbuf);
279 eina_strbuf_append_printf(buf, "#define %s (&(_%s))\n", evn, evn);
300 280
301 eina_stringshare_del(evn); 281 if (evs == EOLIAN_SCOPE_PROTECTED)
302 } 282 eina_strbuf_append(buf, "#endif\n");
303 eina_iterator_free(itr); 283 if (eolian_event_is_beta(ev))
284 eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
285
286 eina_stringshare_del(evn);
304 } 287 }
305 if (!legacy && eolian_class_is_beta(cl)) 288 eina_iterator_free(itr);
289
290 if (eolian_class_is_beta(cl))
306 { 291 {
307 eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); 292 eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
308 } 293 }
309 294
310 free(cname);
311 free(cnameu); 295 free(cnameu);
312} 296}
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,
396{ 396{
397 INF("generating source: %s", ofname); 397 INF("generating source: %s", ofname);
398 Eina_Strbuf *buf = eina_strbuf_new(); 398 Eina_Strbuf *buf = eina_strbuf_new();
399 Eina_Strbuf *lbuf = eina_strbuf_new();
400 Eina_Strbuf *oflname = eina_strbuf_new();
401 Eina_Bool ret = EINA_FALSE; 399 Eina_Bool ret = EINA_FALSE;
402 400
403 const char *lext = strrchr(ofname, '.');
404 if (!lext)
405 {
406 eina_strbuf_append(oflname, ofname);
407 eina_strbuf_append(oflname, ".legacy.c");
408 }
409 else
410 {
411 eina_strbuf_append_length(oflname, ofname, strlen(ofname) - strlen(lext));
412 eina_strbuf_append(oflname, ".legacy");
413 eina_strbuf_append(oflname, lext);
414 }
415 const char *lfname = eina_strbuf_string_get(oflname);
416 {
417 const char *p1 = strrchr(lfname, '/');
418 const char *p2 = strrchr(lfname, '\\');
419 lfname = (p1 || p2) ? ((p1 > p2) ? (p1 + 1) : (p2 + 1)) : lfname;
420 }
421 const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname); 401 const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
422 eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf); 402 eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf);
423 eo_gen_source_gen(cl, buf, lbuf, lfname); 403 eo_gen_source_gen(cl, buf);
424 if (cl || (eot && eina_strbuf_length_get(buf))) 404 if (cl || (eot && eina_strbuf_length_get(buf)))
425 { 405 {
426 if (!_write_file(ofname, buf)) 406 if (!_write_file(ofname, buf))
427 goto done; 407 goto done;
428 if (eina_strbuf_length_get(lbuf))
429 {
430 if (!_write_file(eina_strbuf_string_get(oflname), lbuf))
431 goto done;
432 }
433 ret = EINA_TRUE; 408 ret = EINA_TRUE;
434 } 409 }
435 410
436done: 411done:
437 eina_strbuf_free(buf); 412 eina_strbuf_free(buf);
438 eina_strbuf_free(lbuf);
439 eina_strbuf_free(oflname);
440 return ret; 413 return ret;
441} 414}
442 415
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,
358 Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN); 358 Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN);
359 const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : ""; 359 const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : "";
360 360
361 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET, EINA_FALSE); 361 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET);
362 eina_strbuf_append_printf(buf, " %s%sval = %s(obj);\n", ct, starsp, fcn); 362 eina_strbuf_append_printf(buf, " %s%sval = %s(obj);\n", ct, starsp, fcn);
363 eina_stringshare_del(fcn); 363 eina_stringshare_del(fcn);
364 eina_stringshare_del(ct); 364 eina_stringshare_del(ct);
@@ -402,7 +402,7 @@ _gen_reflect_set(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
402 eina_strbuf_append(buf, " goto end;\n"); 402 eina_strbuf_append(buf, " goto end;\n");
403 eina_strbuf_append(buf, " }\n"); 403 eina_strbuf_append(buf, " }\n");
404 404
405 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET, EINA_FALSE); 405 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET);
406 eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn); 406 eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn);
407 eina_stringshare_del(fcn); 407 eina_stringshare_del(fcn);
408 408
@@ -449,8 +449,7 @@ _emit_class_function(Eina_Strbuf *buf, const Eolian_Function *fid, const Eolian_
449static void 449static void
450_gen_func(const Eolian_Class *cl, const Eolian_Function *fid, 450_gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
451 Eolian_Function_Type ftype, Eina_Strbuf *buf, 451 Eolian_Function_Type ftype, Eina_Strbuf *buf,
452 const Eolian_Implement *impl, Eina_Strbuf *lbuf, 452 const Eolian_Implement *impl, Eina_Hash *refh)
453 Eina_Hash *refh)
454{ 453{
455 Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype); 454 Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype);
456 Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype); 455 Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype);
@@ -819,7 +818,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
819 { 818 {
820 //we have owned parameters we need to take care of 819 //we have owned parameters we need to take care of
821 eina_strbuf_append_printf(buf, "static void\n"); 820 eina_strbuf_append_printf(buf, "static void\n");
822 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); 821 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);
823 822
824 eina_strbuf_append_buffer(buf, fallback_free_ownership); 823 eina_strbuf_append_buffer(buf, fallback_free_ownership);
825 eina_strbuf_append_printf(buf, "}\n\n"); 824 eina_strbuf_append_printf(buf, "}\n\n");
@@ -842,7 +841,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
842 841
843 eina_strbuf_append_char(buf, '('); 842 eina_strbuf_append_char(buf, '(');
844 843
845 Eina_Stringshare *eofn = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE); 844 Eina_Stringshare *eofn = eolian_function_full_c_name_get(fid, ftype);
846 eina_strbuf_append(buf, eofn); 845 eina_strbuf_append(buf, eofn);
847 846
848 if (strcmp(rtpn, "void")) 847 if (strcmp(rtpn, "void"))
@@ -852,7 +851,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
852 } 851 }
853 852
854 if (fallback_free_ownership) 853 if (fallback_free_ownership)
855 eina_strbuf_append_printf(buf, ", _%s_ownership_fallback(%s);", eolian_function_full_c_name_get(fid, ftype, EINA_FALSE), eina_strbuf_string_get(params)); 854 eina_strbuf_append_printf(buf, ", _%s_ownership_fallback(%s);", eolian_function_full_c_name_get(fid, ftype), eina_strbuf_string_get(params));
856 855
857 if (has_params) 856 if (has_params)
858 { 857 {
@@ -864,59 +863,10 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
864 863
865 eina_strbuf_append(buf, ");\n"); 864 eina_strbuf_append(buf, ");\n");
866 865
867 /* now try legacy */
868 Eina_Stringshare *lfn = eolian_function_full_c_name_get(fid, ftype, EINA_TRUE);
869 if (!eolian_function_is_beta(fid) && lfn)
870 {
871 eina_strbuf_append(lbuf, "\nEAPI ");
872 eina_strbuf_append(lbuf, rtpn);
873 eina_strbuf_append_char(lbuf, '\n');
874 eina_strbuf_append(lbuf, lfn);
875 /* param list */
876 eina_strbuf_append_char(lbuf, '(');
877 /* for class funcs, offset the params to remove comma */
878 int poff = 2;
879 if (!eolian_function_is_class(fid))
880 {
881 /* non-class funcs have the obj though */
882 poff = 0;
883 if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
884 eina_strbuf_append(lbuf, "const ");
885 eina_strbuf_append_printf(lbuf, "%s *obj", cname);
886 }
887 eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full) + poff);
888 eina_strbuf_append(lbuf, ")\n{\n");
889 /* body */
890 if (strcmp(rtpn, "void"))
891 eina_strbuf_append(lbuf, " return ");
892 else
893 eina_strbuf_append(lbuf, " ");
894 eina_strbuf_append(lbuf, eofn);
895 eina_strbuf_append_char(lbuf, '(');
896 if (!eolian_function_is_class(fid))
897 eina_strbuf_append(lbuf, "obj");
898 else
899 {
900 Eina_Stringshare *mname = eolian_class_c_name_get(cl);
901 eina_strbuf_append(lbuf, mname);
902 eina_stringshare_del(mname);
903 }
904 if (has_params)
905 eina_strbuf_append_printf(lbuf, ", %s", eina_strbuf_string_get(params));
906 eina_strbuf_append(lbuf, ");\n}\n");
907 }
908
909 eina_stringshare_del(lfn);
910 eina_stringshare_del(eofn); 866 eina_stringshare_del(eofn);
911 } 867 }
912 if (impl_same_class && eolian_function_is_class(fid)) 868 if (impl_same_class && eolian_function_is_class(fid))
913 { 869 _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype));
914 const char *legacy_name = eolian_function_full_c_name_get(fid, ftype, EINA_TRUE);
915
916 _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype, EINA_FALSE));
917 if (legacy_name)
918 _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, legacy_name);
919 }
920 870
921 free(cname); 871 free(cname);
922 free(cnamel); 872 free(cnamel);
@@ -937,7 +887,7 @@ _gen_opfunc(const Eolian_Function *fid, Eolian_Function_Type ftype,
937 Eina_Strbuf *buf, const Eolian_Implement *impl, Eina_Bool pinit, 887 Eina_Strbuf *buf, const Eolian_Implement *impl, Eina_Bool pinit,
938 const char *cnamel, const char *ocnamel) 888 const char *cnamel, const char *ocnamel)
939{ 889{
940 Eina_Stringshare *fnm = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE); 890 Eina_Stringshare *fnm = eolian_function_full_c_name_get(fid, ftype);
941 eina_strbuf_append(buf, " EFL_OBJECT_OP_FUNC("); 891 eina_strbuf_append(buf, " EFL_OBJECT_OP_FUNC(");
942 eina_strbuf_append(buf, fnm); 892 eina_strbuf_append(buf, fnm);
943 eina_strbuf_append(buf, ", "); 893 eina_strbuf_append(buf, ", ");
@@ -1086,8 +1036,7 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh)
1086} 1036}
1087 1037
1088void 1038void
1089eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, 1039eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
1090 const char *lfname)
1091{ 1040{
1092 if (!cl) 1041 if (!cl)
1093 return; 1042 return;
@@ -1135,14 +1084,14 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf,
1135 { 1084 {
1136 case EOLIAN_PROP_GET: 1085 case EOLIAN_PROP_GET:
1137 case EOLIAN_PROP_SET: 1086 case EOLIAN_PROP_SET:
1138 _gen_func(cl, fid, ftype, buf, imp, lbuf, refh); 1087 _gen_func(cl, fid, ftype, buf, imp, refh);
1139 break; 1088 break;
1140 case EOLIAN_PROPERTY: 1089 case EOLIAN_PROPERTY:
1141 _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf, refh); 1090 _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, refh);
1142 _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf, refh); 1091 _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, refh);
1143 break; 1092 break;
1144 default: 1093 default:
1145 _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf, refh); 1094 _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, refh);
1146 } 1095 }
1147 } 1096 }
1148 eina_iterator_free(itr); 1097 eina_iterator_free(itr);
@@ -1230,10 +1179,6 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf,
1230 /* terminate inherits */ 1179 /* terminate inherits */
1231 eina_strbuf_append(buf, ", NULL);\n"); 1180 eina_strbuf_append(buf, ", NULL);\n");
1232 1181
1233 /* append legacy include if there */
1234 if (eina_strbuf_length_get(lbuf))
1235 eina_strbuf_append_printf(buf, "\n#include \"%s\"\n", lfname);
1236
1237 /* and we're done */ 1182 /* and we're done */
1238 free(cnamel); 1183 free(cnamel);
1239 eina_hash_free(_funcs_params_init_get); 1184 eina_hash_free(_funcs_params_init_get);
@@ -1395,7 +1340,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
1395 if (strlen(efname) >= (sizeof("destructor") - 1) && !impl_same_class) 1340 if (strlen(efname) >= (sizeof("destructor") - 1) && !impl_same_class)
1396 if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, "destructor")) 1341 if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, "destructor"))
1397 { 1342 {
1398 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE); 1343 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype);
1399 Eina_Stringshare *mname = eolian_class_c_name_get(cl); 1344 Eina_Stringshare *mname = eolian_class_c_name_get(cl);
1400 eina_strbuf_append(buf, " "); 1345 eina_strbuf_append(buf, " ");
1401 eina_strbuf_append(buf, fcn); 1346 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 @@
3 3
4#include "main.h" 4#include "main.h"
5 5
6void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, const char *lfname); 6void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
7void eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf); 7void eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf);
8 8
9#endif 9#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
50 { 50 {
51 case ::EOLIAN_METHOD: 51 case ::EOLIAN_METHOD:
52 if (blacklist::is_function_blacklisted( 52 if (blacklist::is_function_blacklisted(
53 ::eolian_function_full_c_name_get(function, ftype, EINA_FALSE))) return ""; 53 ::eolian_function_full_c_name_get(function, ftype))) return "";
54 name += "."; 54 name += ".";
55 name += name_helpers::managed_method_name( 55 name += name_helpers::managed_method_name(
56 ::eolian_object_short_name_get(klass), eo_name); 56 ::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 [[
335 335
336 Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); 336 Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
337 const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass); 337 const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass);
338 const char *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
339 const char *eolian_class_eo_prefix_get(const Eolian_Class *klass); 338 const char *eolian_class_eo_prefix_get(const Eolian_Class *klass);
340 const char *eolian_class_data_type_get(const Eolian_Class *klass); 339 const char *eolian_class_data_type_get(const Eolian_Class *klass);
341 const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass); 340 const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass);
@@ -343,11 +342,9 @@ ffi.cdef [[
343 Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type); 342 Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type);
344 Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id); 343 Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id);
345 Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); 344 Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
346 const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy); 345 const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
347 const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); 346 const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
348 const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
349 const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); 347 const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
350 Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
351 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); 348 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
352 Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); 349 Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass);
353 Eina_Bool eolian_function_is_function_pointer(const Eolian_Function *function_id); 350 Eina_Bool eolian_function_is_function_pointer(const Eolian_Function *function_id);
@@ -1066,28 +1063,18 @@ M.Function = ffi.metatype("Eolian_Function", {
1066 return tonumber(eolian.eolian_function_scope_get(self, ftype)) 1063 return tonumber(eolian.eolian_function_scope_get(self, ftype))
1067 end, 1064 end,
1068 1065
1069 full_c_name_get = function(self, ftype, use_legacy) 1066 full_c_name_get = function(self, ftype)
1070 local v = eolian.eolian_function_full_c_name_get(self, ftype, use_legacy or false) 1067 local v = eolian.eolian_function_full_c_name_get(self, ftype)
1071 if v == nil then return nil end 1068 if v == nil then return nil end
1072 return ffi_stringshare(v) 1069 return ffi_stringshare(v)
1073 end, 1070 end,
1074 1071
1075 legacy_get = function(self, ftype)
1076 local v = eolian.eolian_function_legacy_get(self, ftype)
1077 if v == nil then return nil end
1078 return ffi.string(v)
1079 end,
1080
1081 implement_get = function(self) 1072 implement_get = function(self)
1082 local v = eolian.eolian_function_implement_get(self) 1073 local v = eolian.eolian_function_implement_get(self)
1083 if v == nil then return nil end 1074 if v == nil then return nil end
1084 return v 1075 return v
1085 end, 1076 end,
1086 1077
1087 is_legacy_only = function(self, ftype)
1088 return eolian.eolian_function_is_legacy_only(self, ftype) ~= 0
1089 end,
1090
1091 is_class = function(self) 1078 is_class = function(self)
1092 return eolian.eolian_function_is_class(self) ~= 0 1079 return eolian.eolian_function_is_class(self) ~= 0
1093 end, 1080 end,
@@ -1318,12 +1305,6 @@ M.Class = ffi.metatype("Eolian_Class", {
1318 return v 1305 return v
1319 end, 1306 end,
1320 1307
1321 legacy_prefix_get = function(self)
1322 local v = eolian.eolian_class_legacy_prefix_get(self)
1323 if v == nil then return nil end
1324 return ffi.string(v)
1325 end,
1326
1327 eo_prefix_get = function(self) 1308 eo_prefix_get = function(self)
1328 local v = eolian.eolian_class_eo_prefix_get(self) 1309 local v = eolian.eolian_class_eo_prefix_get(self)
1329 if v == nil then 1310 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
5 methods { 5 methods {
6 rgb_24bits_constructor { 6 rgb_24bits_constructor {
7 [[RGB Constructor.]] 7 [[RGB Constructor.]]
8 legacy: null;
9 params { 8 params {
10 @in rgb: int; [[24-bit RGB Component.]] 9 @in rgb: int; [[24-bit RGB Component.]]
11 } 10 }
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
14 } 14 }
15 } 15 }
16 size_constructor { 16 size_constructor {
17 legacy: null;
18 params { 17 params {
19 @in size: int; 18 @in size: int;
20 } 19 }
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);
1421EAPI const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass); 1421EAPI const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass);
1422 1422
1423/* 1423/*
1424 * @brief Returns the legacy prefix of a class
1425 *
1426 * @param[in] klass the class
1427 * @return the legacy prefix
1428 *
1429 * @ingroup Eolian
1430 */
1431EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
1432
1433/*
1434 * @brief Returns the eo prefix of a class 1424 * @brief Returns the eo prefix of a class
1435 * 1425 *
1436 * @param[in] klass the class 1426 * @param[in] klass the class
@@ -1559,22 +1549,20 @@ eolian_function_name_get(const Eolian_Function *fid)
1559 * 1549 *
1560 * @param[in] function_id Id of the function 1550 * @param[in] function_id Id of the function
1561 * @param[in] ftype The type of function to get the name for 1551 * @param[in] ftype The type of function to get the name for
1562 * @param[in] use_legacy If true, legacy prefix or name will be used when available
1563 * @return the function name 1552 * @return the function name
1564 * 1553 *
1565 * It's here because the C API names are deduplicated (prefix of function and 1554 * It's here because the C API names are deduplicated (prefix of function and
1566 * suffix of prefix merge if applicable) and this helps generators not write 1555 * suffix of prefix merge if applicable) and this helps generators not write
1567 * the same code over and over. 1556 * the same code over and over.
1568 * 1557 *
1569 * If legacy name is supplied for the given type and use_legacy is set, it 1558 * If the given type is PROP_GET or PROPERTY, a "_get" suffix will be applied,
1570 * will be used. Also, if the given type is PROP_GET or PROPERTY, a "_get" 1559 * and "_set" for PROP_SET.
1571 * suffix will be applied when not using legacy name, and "_set" for PROP_SET.
1572 * 1560 *
1573 * Also, you're responsible for deleting the stringshare. 1561 * Also, you're responsible for deleting the stringshare.
1574 * 1562 *
1575 * @ingroup Eolian 1563 * @ingroup Eolian
1576 */ 1564 */
1577EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy); 1565EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
1578 1566
1579/* 1567/*
1580 * @brief Get a function in a class by its name and type 1568 * @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
1593EAPI const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); 1581EAPI const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
1594 1582
1595/* 1583/*
1596 * @brief Returns a legacy name for a function.
1597 *
1598 * @param[in] function_id Id of the function
1599 * @param[in] f_type The function type, for property get/set distinction.
1600 * @return the legacy name or NULL.
1601 *
1602 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1603 *
1604 * @ingroup Eolian
1605 */
1606EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
1607
1608/*
1609 * @brief Returns the implement for a function. 1584 * @brief Returns the implement for a function.
1610 * 1585 *
1611 * @param[in] function_id Id of the function 1586 * @param[in] function_id Id of the function
@@ -1616,19 +1591,6 @@ EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *functio
1616EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); 1591EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
1617 1592
1618/* 1593/*
1619 * @brief Indicates if a function is legacy only.
1620 *
1621 * @param[in] function_id Id of the function
1622 * @param[in] f_type The function type, for property get/set distinction.
1623 * @return EINA_TRUE if legacy only, EINA_FALSE otherwise.
1624 *
1625 * Acceptable input types are METHOD, PROP_GET and PROP_SET.
1626 *
1627 * @ingroup Eolian
1628 */
1629EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
1630
1631/*
1632 * @brief Get whether a function is a class method/property. 1594 * @brief Get whether a function is a class method/property.
1633 * 1595 *
1634 * @param[in] function_id Id of the function 1596 * @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)
33 eina_list_free(cl->callables); 33 eina_list_free(cl->callables);
34 eina_list_free(cl->composite); 34 eina_list_free(cl->composite);
35 35
36 if (cl->legacy_prefix) eina_stringshare_del(cl->legacy_prefix);
37 if (cl->eo_prefix) eina_stringshare_del(cl->eo_prefix); 36 if (cl->eo_prefix) eina_stringshare_del(cl->eo_prefix);
38 if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix); 37 if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix);
39 if (cl->data_type) eina_stringshare_del(cl->data_type); 38 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)
21} 21}
22 22
23EAPI Eina_Stringshare* 23EAPI Eina_Stringshare*
24eolian_class_legacy_prefix_get(const Eolian_Class *cl)
25{
26 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
27 return cl->legacy_prefix;
28}
29
30EAPI Eina_Stringshare*
31eolian_class_eo_prefix_get(const Eolian_Class *cl) 24eolian_class_eo_prefix_get(const Eolian_Class *cl)
32{ 25{
33 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL); 26 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)
25 database_type_del(fid->set_ret_type); 25 database_type_del(fid->set_ret_type);
26 database_expr_del(fid->get_ret_val); 26 database_expr_del(fid->get_ret_val);
27 database_expr_del(fid->set_ret_val); 27 database_expr_del(fid->set_ret_val);
28 if (fid->get_legacy) eina_stringshare_del(fid->get_legacy);
29 if (fid->set_legacy) eina_stringshare_del(fid->set_legacy);
30 database_doc_del(fid->get_return_doc); 28 database_doc_del(fid->get_return_doc);
31 database_doc_del(fid->set_return_doc); 29 database_doc_del(fid->set_return_doc);
32 free(fid); 30 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)
38} 38}
39 39
40static const char * 40static const char *
41_get_eo_prefix(const Eolian_Function *foo_id, char *buf, Eina_Bool use_legacy) 41_get_eo_prefix(const Eolian_Function *foo_id, char *buf)
42{ 42{
43 char *tmp = buf; 43 char *tmp = buf;
44 if (use_legacy) 44 if (foo_id->klass->eo_prefix)
45 return foo_id->klass->legacy_prefix;
46 else if (foo_id->klass->eo_prefix)
47 return foo_id->klass->eo_prefix; 45 return foo_id->klass->eo_prefix;
48 strcpy(buf, foo_id->klass->base.name); 46 strcpy(buf, foo_id->klass->base.name);
49 eina_str_tolower(&buf); 47 eina_str_tolower(&buf);
@@ -86,36 +84,11 @@ _get_abbreviated_name(const char *prefix, const char *fname)
86 84
87EAPI Eina_Stringshare * 85EAPI Eina_Stringshare *
88eolian_function_full_c_name_get(const Eolian_Function *foo_id, 86eolian_function_full_c_name_get(const Eolian_Function *foo_id,
89 Eolian_Function_Type ftype, 87 Eolian_Function_Type ftype)
90 Eina_Bool use_legacy)
91{ 88{
92 switch (ftype)
93 {
94 case EOLIAN_UNRESOLVED:
95 case EOLIAN_METHOD:
96 case EOLIAN_PROPERTY:
97 case EOLIAN_PROP_GET:
98 case EOLIAN_FUNCTION_POINTER:
99 if (foo_id->get_legacy && use_legacy)
100 {
101 if (!strcmp(foo_id->get_legacy, "null"))
102 return NULL;
103 return eina_stringshare_ref(foo_id->get_legacy);
104 }
105 break;
106 case EOLIAN_PROP_SET:
107 if (foo_id->set_legacy && use_legacy)
108 {
109 if (!strcmp(foo_id->set_legacy, "null"))
110 return NULL;
111 return eina_stringshare_ref(foo_id->set_legacy);
112 }
113 break;
114 }
115
116 char tbuf[512]; 89 char tbuf[512];
117 tbuf[0] = '\0'; 90 tbuf[0] = '\0';
118 const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf, use_legacy): tbuf; 91 const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf): tbuf;
119 92
120 if (!prefix) 93 if (!prefix)
121 return NULL; 94 return NULL;
@@ -124,22 +97,6 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id,
124 Eina_Strbuf *buf = eina_strbuf_new(); 97 Eina_Strbuf *buf = eina_strbuf_new();
125 Eina_Stringshare *ret; 98 Eina_Stringshare *ret;
126 99
127 if (use_legacy)
128 {
129 eina_strbuf_append(buf, prefix);
130 eina_strbuf_append_char(buf, '_');
131 eina_strbuf_append(buf, funcn);
132
133 if ((ftype == EOLIAN_PROP_GET) || (ftype == EOLIAN_PROPERTY))
134 eina_strbuf_append(buf, "_get");
135 else if (ftype == EOLIAN_PROP_SET)
136 eina_strbuf_append(buf, "_set");
137
138 ret = eina_stringshare_add(eina_strbuf_string_get(buf));
139 eina_strbuf_free(buf);
140 return ret;
141 }
142
143 char *abbr = _get_abbreviated_name(prefix, funcn); 100 char *abbr = _get_abbreviated_name(prefix, funcn);
144 eina_strbuf_append(buf, abbr); 101 eina_strbuf_append(buf, abbr);
145 free(abbr); 102 free(abbr);
@@ -154,31 +111,6 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id,
154 return ret; 111 return ret;
155} 112}
156 113
157EAPI Eina_Stringshare *
158eolian_function_legacy_get(const Eolian_Function *fid, Eolian_Function_Type ftype)
159{
160 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
161 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
162 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
163 switch (ftype)
164 {
165 case EOLIAN_METHOD:
166 if (fid->type != EOLIAN_METHOD)
167 return NULL;
168 return fid->get_legacy;
169 case EOLIAN_PROP_GET:
170 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
171 return NULL;
172 return fid->get_legacy;
173 case EOLIAN_PROP_SET:
174 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
175 return NULL;
176 return fid->set_legacy;
177 default:
178 return NULL;
179 }
180}
181
182EAPI const Eolian_Implement * 114EAPI const Eolian_Implement *
183eolian_function_implement_get(const Eolian_Function *fid) 115eolian_function_implement_get(const Eolian_Function *fid)
184{ 116{
@@ -187,31 +119,6 @@ eolian_function_implement_get(const Eolian_Function *fid)
187} 119}
188 120
189EAPI Eina_Bool 121EAPI Eina_Bool
190eolian_function_is_legacy_only(const Eolian_Function *fid, Eolian_Function_Type ftype)
191{
192 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
193 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
194 EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
195 switch (ftype)
196 {
197 case EOLIAN_METHOD:
198 if (fid->type != EOLIAN_METHOD)
199 return EINA_FALSE;
200 return fid->get_only_legacy;
201 case EOLIAN_PROP_GET:
202 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
203 return EINA_FALSE;
204 return fid->get_only_legacy;
205 case EOLIAN_PROP_SET:
206 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
207 return EINA_FALSE;
208 return fid->set_only_legacy;
209 default:
210 return EINA_FALSE;
211 }
212}
213
214EAPI Eina_Bool
215eolian_function_is_class(const Eolian_Function *fid) 122eolian_function_is_class(const Eolian_Function *fid)
216{ 123{
217 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); 124 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)
26 database_type_del(tp->base_type); 26 database_type_del(tp->base_type);
27 if (tp->fields) eina_hash_free(tp->fields); 27 if (tp->fields) eina_hash_free(tp->fields);
28 if (tp->field_list) eina_list_free(tp->field_list); 28 if (tp->field_list) eina_list_free(tp->field_list);
29 if (tp->legacy) eina_stringshare_del(tp->legacy);
30 if (tp->freefunc) eina_stringshare_del(tp->freefunc); 29 if (tp->freefunc) eina_stringshare_del(tp->freefunc);
31 database_doc_del(tp->doc); 30 database_doc_del(tp->doc);
32 free(tp); 31 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)
247 return EINA_FALSE; 247 return EINA_FALSE;
248 } 248 }
249 249
250 if (tp->is_ptr && !tp->legacy) 250 if (tp->is_ptr)
251 { 251 {
252 tp->is_ptr = EINA_FALSE; 252 tp->is_ptr = EINA_FALSE;
253 Eina_Bool still_ownable = database_type_is_ownable(src, tp, EINA_FALSE); 253 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
25#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \ 25#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
26 \ 26 \
27 KW(abstract), KW(composite), KW(constructor), KW(constructors), KW(data), \ 27 KW(abstract), KW(composite), KW(constructor), KW(constructors), KW(data), \
28 KW(destructor), KW(eo), KW(eo_prefix), KW(event_prefix), KW(events), \ 28 KW(destructor), KW(eo_prefix), KW(event_prefix), KW(events), \
29 KW(extends), KW(free), KW(get), KW(implements), KW(import), KW(interface), \ 29 KW(extends), KW(free), KW(get), KW(implements), KW(import), KW(interface), \
30 KW(keys), KW(legacy), KW(legacy_prefix), KW(methods), KW(mixin), KW(params), \ 30 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
31 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \ 31 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \
32 \ 32 \
33 KWAT(auto), KWAT(beta), KWAT(class), KWAT(const), KWAT(cref), KWAT(empty), \ 33 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)
631 check_match(ls, ')', '(', pline, pcol); 631 check_match(ls, ')', '(', pline, pcol);
632 return def; 632 return def;
633 } 633 }
634 case KW_legacy:
635 {
636 int pline, pcol;
637 eo_lexer_get(ls);
638 pline = ls->line_number;
639 pcol = ls->column;
640 check_next(ls, '(');
641 def = parse_type_void(ls, allow_ptr);
642 FILL_BASE(def->base, ls, line, col, TYPE);
643 def->legacy = EINA_TRUE;
644 check_match(ls, ')', '(', pline, pcol);
645 return def;
646 }
647 case KW_free: 634 case KW_free:
648 { 635 {
649 int pline, pcolumn; 636 int pline, pcolumn;
@@ -984,17 +971,6 @@ end:
984} 971}
985 972
986static void 973static void
987parse_legacy(Eo_Lexer *ls, const char **out)
988{
989 eo_lexer_get(ls);
990 check_next(ls, ':');
991 check(ls, TOK_VALUE);
992 *out = eina_stringshare_ref(ls->t.value.s);
993 eo_lexer_get(ls);
994 check_next(ls, ';');
995}
996
997static void
998parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout, 974parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
999 Eina_Bool is_vals) 975 Eina_Bool is_vals)
1000{ 976{
@@ -1018,7 +994,7 @@ static void
1018parse_accessor(Eo_Lexer *ls, Eolian_Function *prop) 994parse_accessor(Eo_Lexer *ls, Eolian_Function *prop)
1019{ 995{
1020 int line, col; 996 int line, col;
1021 Eina_Bool has_return = EINA_FALSE, has_legacy = EINA_FALSE, 997 Eina_Bool has_return = EINA_FALSE,
1022 has_eo = EINA_FALSE, has_keys = EINA_FALSE, 998 has_eo = EINA_FALSE, has_keys = EINA_FALSE,
1023 has_values = EINA_FALSE, has_protected = EINA_FALSE, 999 has_values = EINA_FALSE, has_protected = EINA_FALSE,
1024 has_virtp = EINA_FALSE; 1000 has_virtp = EINA_FALSE;
@@ -1113,24 +1089,6 @@ parse_accessor:
1113 prop->set_ret_type->owned = ret.owned; 1089 prop->set_ret_type->owned = ret.owned;
1114 } 1090 }
1115 break; 1091 break;
1116 case KW_legacy:
1117 CASE_LOCK(ls, legacy, "legacy name")
1118 if (is_get)
1119 parse_legacy(ls, &prop->get_legacy);
1120 else
1121 parse_legacy(ls, &prop->set_legacy);
1122 break;
1123 case KW_eo:
1124 CASE_LOCK(ls, eo, "eo name")
1125 eo_lexer_get(ls);
1126 check_next(ls, ':');
1127 check_kw_next(ls, KW_null);
1128 check_next(ls, ';');
1129 if (is_get)
1130 prop->get_only_legacy = EINA_TRUE;
1131 else
1132 prop->set_only_legacy = EINA_TRUE;
1133 break;
1134 case KW_keys: 1092 case KW_keys:
1135 { 1093 {
1136 Eina_List **stor; 1094 Eina_List **stor;
@@ -1352,7 +1310,7 @@ parse_method(Eo_Lexer *ls)
1352 Eolian_Function *meth = NULL; 1310 Eolian_Function *meth = NULL;
1353 Eolian_Implement *impl = NULL; 1311 Eolian_Implement *impl = NULL;
1354 Eina_Bool has_const = EINA_FALSE, has_params = EINA_FALSE, 1312 Eina_Bool has_const = EINA_FALSE, has_params = EINA_FALSE,
1355 has_return = EINA_FALSE, has_legacy = EINA_FALSE, 1313 has_return = EINA_FALSE,
1356 has_protected = EINA_FALSE, has_class = EINA_FALSE, 1314 has_protected = EINA_FALSE, has_class = EINA_FALSE,
1357 has_eo = EINA_FALSE, has_beta = EINA_FALSE, 1315 has_eo = EINA_FALSE, has_beta = EINA_FALSE,
1358 has_virtp = EINA_FALSE; 1316 has_virtp = EINA_FALSE;
@@ -1428,18 +1386,6 @@ body:
1428 meth->get_return_warn_unused = ret.warn_unused; 1386 meth->get_return_warn_unused = ret.warn_unused;
1429 meth->get_ret_type->owned = ret.owned; 1387 meth->get_ret_type->owned = ret.owned;
1430 break; 1388 break;
1431 case KW_legacy:
1432 CASE_LOCK(ls, legacy, "legacy name")
1433 parse_legacy(ls, &meth->get_legacy);
1434 break;
1435 case KW_eo:
1436 CASE_LOCK(ls, eo, "eo name")
1437 eo_lexer_get(ls);
1438 check_next(ls, ':');
1439 check_kw_next(ls, KW_null);
1440 check_next(ls, ';');
1441 meth->get_only_legacy = EINA_TRUE;
1442 break;
1443 case KW_params: 1389 case KW_params:
1444 CASE_LOCK(ls, params, "params definition") 1390 CASE_LOCK(ls, params, "params definition")
1445 parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE); 1391 parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE);
@@ -1921,8 +1867,7 @@ error:
1921static void 1867static void
1922parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) 1868parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type)
1923{ 1869{
1924 Eina_Bool has_legacy_prefix = EINA_FALSE, 1870 Eina_Bool has_eo_prefix = EINA_FALSE,
1925 has_eo_prefix = EINA_FALSE,
1926 has_event_prefix = EINA_FALSE, 1871 has_event_prefix = EINA_FALSE,
1927 has_data = EINA_FALSE, 1872 has_data = EINA_FALSE,
1928 has_methods = EINA_FALSE, 1873 has_methods = EINA_FALSE,
@@ -1938,15 +1883,6 @@ parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type)
1938 } 1883 }
1939 for (;;) switch (ls->t.kw) 1884 for (;;) switch (ls->t.kw)
1940 { 1885 {
1941 case KW_legacy_prefix:
1942 CASE_LOCK(ls, legacy_prefix, "legacy prefix definition")
1943 eo_lexer_get(ls);
1944 check_next(ls, ':');
1945 _validate_pfx(ls);
1946 ls->klass->legacy_prefix = eina_stringshare_ref(ls->t.value.s);
1947 eo_lexer_get(ls);
1948 check_next(ls, ';');
1949 break;
1950 case KW_eo_prefix: 1886 case KW_eo_prefix:
1951 CASE_LOCK(ls, eo_prefix, "eo prefix definition") 1887 CASE_LOCK(ls, eo_prefix, "eo prefix definition")
1952 eo_lexer_get(ls); 1888 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
177 Eolian_Object base; 177 Eolian_Object base;
178 Eolian_Class_Type type; 178 Eolian_Class_Type type;
179 Eolian_Documentation *doc; 179 Eolian_Documentation *doc;
180 Eina_Stringshare *legacy_prefix;
181 Eina_Stringshare *eo_prefix; 180 Eina_Stringshare *eo_prefix;
182 Eina_Stringshare *ev_prefix; 181 Eina_Stringshare *ev_prefix;
183 Eina_Stringshare *data_type; 182 Eina_Stringshare *data_type;
@@ -222,15 +221,11 @@ struct _Eolian_Function
222 Eolian_Expression *get_ret_val; 221 Eolian_Expression *get_ret_val;
223 Eolian_Expression *set_ret_val; 222 Eolian_Expression *set_ret_val;
224 Eolian_Implement *impl; 223 Eolian_Implement *impl;
225 Eina_Stringshare *get_legacy;
226 Eina_Stringshare *set_legacy;
227 Eolian_Documentation *get_return_doc; 224 Eolian_Documentation *get_return_doc;
228 Eolian_Documentation *set_return_doc; 225 Eolian_Documentation *set_return_doc;
229 Eina_Bool obj_is_const :1; /* True if the object has to be const. Useful for a few methods. */ 226 Eina_Bool obj_is_const :1; /* True if the object has to be const. Useful for a few methods. */
230 Eina_Bool get_return_warn_unused :1; /* also used for methods */ 227 Eina_Bool get_return_warn_unused :1; /* also used for methods */
231 Eina_Bool set_return_warn_unused :1; 228 Eina_Bool set_return_warn_unused :1;
232 Eina_Bool get_only_legacy: 1;
233 Eina_Bool set_only_legacy: 1;
234 Eina_Bool is_class :1; 229 Eina_Bool is_class :1;
235 Eina_List *ctor_of; 230 Eina_List *ctor_of;
236 Eolian_Class *klass; 231 Eolian_Class *klass;
@@ -276,7 +271,6 @@ struct _Eolian_Type
276 Eina_Bool is_const :1; 271 Eina_Bool is_const :1;
277 Eina_Bool is_ptr :1; 272 Eina_Bool is_ptr :1;
278 Eina_Bool owned :1; 273 Eina_Bool owned :1;
279 Eina_Bool legacy :1;
280}; 274};
281 275
282struct _Eolian_Typedecl 276struct _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
757 else 757 else
758 parameters.insert(parameters.end(), values.begin(), values.end()); 758 parameters.insert(parameters.end(), values.begin(), values.end());
759 } 759 }
760 c_name = eolian_function_full_c_name_get(function, type, EINA_FALSE); 760 c_name = eolian_function_full_c_name_get(function, type);
761 if (type != EOLIAN_FUNCTION_POINTER) 761 if (type != EOLIAN_FUNCTION_POINTER)
762 { 762 {
763 const Eolian_Class *eolian_klass = eolian_function_class_get(function); 763 const Eolian_Class *eolian_klass = eolian_function_class_get(function);
@@ -1253,8 +1253,7 @@ struct klass_def
1253 efl::eina::optional<function_def> getter(nullptr); 1253 efl::eina::optional<function_def> getter(nullptr);
1254 efl::eina::optional<function_def> setter(nullptr); 1254 efl::eina::optional<function_def> setter(nullptr);
1255 try { 1255 try {
1256 if(! ::eolian_function_is_legacy_only(function, EOLIAN_PROP_GET) 1256 if(::eolian_function_scope_get(function, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PRIVATE)
1257 && ::eolian_function_scope_get(function, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PRIVATE)
1258 { 1257 {
1259 function_def f(function, EOLIAN_PROP_GET, NULL, unit); 1258 function_def f(function, EOLIAN_PROP_GET, NULL, unit);
1260 functions.push_back(f); 1259 functions.push_back(f);
@@ -1262,8 +1261,7 @@ struct klass_def
1262 } 1261 }
1263 } catch(std::exception const&) {} 1262 } catch(std::exception const&) {}
1264 try { 1263 try {
1265 if(! ::eolian_function_is_legacy_only(function, EOLIAN_PROP_SET) 1264 if(::eolian_function_scope_get(function, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PRIVATE)
1266 && ::eolian_function_scope_get(function, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PRIVATE)
1267 { 1265 {
1268 function_def f(function, EOLIAN_PROP_SET, NULL, unit); 1266 function_def f(function, EOLIAN_PROP_SET, NULL, unit);
1269 functions.push_back(f); 1267 functions.push_back(f);
@@ -1275,8 +1273,7 @@ struct klass_def
1275 } 1273 }
1276 else 1274 else
1277 try { 1275 try {
1278 if(! ::eolian_function_is_legacy_only(function, func_type) 1276 if(::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
1279 && ::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
1280 { 1277 {
1281 efl::eina::optional<function_def> getter(nullptr); 1278 efl::eina::optional<function_def> getter(nullptr);
1282 efl::eina::optional<function_def> setter(nullptr); 1279 efl::eina::optional<function_def> setter(nullptr);
@@ -1297,8 +1294,7 @@ struct klass_def
1297 try { 1294 try {
1298 Eolian_Function const* function = &*eolian_functions; 1295 Eolian_Function const* function = &*eolian_functions;
1299 Eolian_Function_Type func_type = eolian_function_type_get(function); 1296 Eolian_Function_Type func_type = eolian_function_type_get(function);
1300 if(! ::eolian_function_is_legacy_only(function, EOLIAN_METHOD) 1297 if(::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
1301 && ::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE)
1302 functions.push_back({function, EOLIAN_METHOD, NULL, unit}); 1298 functions.push_back({function, EOLIAN_METHOD, NULL, unit});
1303 } catch(std::exception const&) {} 1299 } catch(std::exception const&) {}
1304 } 1300 }
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):
661 return ret 661 return ret
662 662
663 @cached_property 663 @cached_property
664 def legacy_prefix(self):
665 return _str_to_py(lib.eolian_class_legacy_prefix_get(self))
666
667 @cached_property
668 def eo_prefix(self): 664 def eo_prefix(self):
669 return _str_to_py(lib.eolian_class_eo_prefix_get(self)) 665 return _str_to_py(lib.eolian_class_eo_prefix_get(self))
670 666
@@ -827,8 +823,8 @@ class Function(Object):
827 def __repr__(self): 823 def __repr__(self):
828 return "<eolian.Function '{0.name}'>".format(self) 824 return "<eolian.Function '{0.name}'>".format(self)
829 825
830 def full_c_name_get(self, ftype, use_legacy=False): 826 def full_c_name_get(self, ftype):
831 s = lib.eolian_function_full_c_name_get(self, ftype, use_legacy) 827 s = lib.eolian_function_full_c_name_get(self, ftype)
832 ret = _str_to_py(s) 828 ret = _str_to_py(s)
833 lib.eina_stringshare_del(c_void_p(s)) 829 lib.eina_stringshare_del(c_void_p(s))
834 return ret 830 return ret
@@ -846,18 +842,6 @@ class Function(Object):
846 return self.full_c_name_get(Eolian_Function_Type.PROP_SET) 842 return self.full_c_name_get(Eolian_Function_Type.PROP_SET)
847 843
848 @cached_property 844 @cached_property
849 def full_c_method_name_legacy(self):
850 return self.full_c_name_get(Eolian_Function_Type.METHOD, True)
851
852 @cached_property
853 def full_c_getter_name_legacy(self):
854 return self.full_c_name_get(Eolian_Function_Type.PROP_GET, True)
855
856 @cached_property
857 def full_c_setter_name_legacy(self):
858 return self.full_c_name_get(Eolian_Function_Type.PROP_SET, True)
859
860 @cached_property
861 def type(self): 845 def type(self):
862 return Eolian_Function_Type(lib.eolian_function_type_get(self)) 846 return Eolian_Function_Type(lib.eolian_function_type_get(self))
863 847
@@ -876,12 +860,6 @@ class Function(Object):
876 def setter_scope(self): 860 def setter_scope(self):
877 return self.scope_get(Eolian_Function_Type.PROP_SET) 861 return self.scope_get(Eolian_Function_Type.PROP_SET)
878 862
879 def legacy_get(self, ftype):
880 return _str_to_py(lib.eolian_function_legacy_get(self, ftype))
881
882 def is_legacy_only(self, ftype):
883 return bool(lib.eolian_function_is_legacy_only(self, ftype))
884
885 @cached_property 863 @cached_property
886 def is_class(self): 864 def is_class(self):
887 return bool(lib.eolian_function_is_class(self)) 865 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
242lib.eolian_class_documentation_get.argtypes = (c_void_p,) 242lib.eolian_class_documentation_get.argtypes = (c_void_p,)
243lib.eolian_class_documentation_get.restype = c_void_p 243lib.eolian_class_documentation_get.restype = c_void_p
244 244
245# EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass);
246lib.eolian_class_legacy_prefix_get.argtypes = (c_void_p,)
247lib.eolian_class_legacy_prefix_get.restype = c_char_p
248
249# EAPI Eina_Stringshare *eolian_class_eo_prefix_get(const Eolian_Class *klass); 245# EAPI Eina_Stringshare *eolian_class_eo_prefix_get(const Eolian_Class *klass);
250lib.eolian_class_eo_prefix_get.argtypes = (c_void_p,) 246lib.eolian_class_eo_prefix_get.argtypes = (c_void_p,)
251lib.eolian_class_eo_prefix_get.restype = c_char_p 247lib.eolian_class_eo_prefix_get.restype = c_char_p
@@ -324,22 +320,14 @@ lib.eolian_function_type_get.restype = c_int
324lib.eolian_function_scope_get.argtypes = (c_void_p, c_int) 320lib.eolian_function_scope_get.argtypes = (c_void_p, c_int)
325lib.eolian_function_scope_get.restype = c_int 321lib.eolian_function_scope_get.restype = c_int
326 322
327# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy); 323# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
328lib.eolian_function_full_c_name_get.argtypes = (c_void_p, c_int, c_bool) 324lib.eolian_function_full_c_name_get.argtypes = (c_void_p, c_int)
329lib.eolian_function_full_c_name_get.restype = c_void_p # Stringshare TO BE FREED 325lib.eolian_function_full_c_name_get.restype = c_void_p # Stringshare TO BE FREED
330 326
331# EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
332lib.eolian_function_legacy_get.argtypes = (c_void_p, c_int)
333lib.eolian_function_legacy_get.restype = c_char_p
334
335# EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); 327# EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
336lib.eolian_function_implement_get.argtypes = (c_void_p,) 328lib.eolian_function_implement_get.argtypes = (c_void_p,)
337lib.eolian_function_implement_get.restype = c_void_p 329lib.eolian_function_implement_get.restype = c_void_p
338 330
339# EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
340lib.eolian_function_is_legacy_only.argtypes = (c_void_p, c_int)
341lib.eolian_function_is_legacy_only.restype = c_bool
342
343# EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); 331# EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
344lib.eolian_function_is_class.argtypes = (c_void_p,) 332lib.eolian_function_is_class.argtypes = (c_void_p,)
345lib.eolian_function_is_class.restype = c_bool 333lib.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
8 8
9class Class_Simple { 9class Class_Simple {
10 [[Class Desc Simple]] 10 [[Class Desc Simple]]
11 legacy_prefix: evas_object_simple;
12 eo_prefix: efl_canvas_object_simple; 11 eo_prefix: efl_canvas_object_simple;
13 data: Evas_Simple_Data; 12 data: Evas_Simple_Data;
14 methods { 13 methods {
@@ -24,11 +23,6 @@ class Class_Simple {
24 value: int (100); [[Value description]] 23 value: int (100); [[Value description]]
25 } 24 }
26 } 25 }
27 @property b {
28 set {
29 eo: null;
30 }
31 }
32 foo @beta { 26 foo @beta {
33 [[comment foo]] 27 [[comment foo]]
34 params { 28 params {
@@ -39,12 +33,5 @@ class Class_Simple {
39 } 33 }
40 return: ptr(char) (null); [[comment for method return]] 34 return: ptr(char) (null); [[comment for method return]]
41 } 35 }
42 bar {
43 eo: null;
44 params {
45 x: int;
46 }
47 return: ptr(int);
48 }
49 } 36 }
50} 37}
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)
32 32
33EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_simple_a_get, int, 100); 33EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_simple_a_get, int, 100);
34 34
35void _class_simple_b_set(Eo *obj, Evas_Simple_Data *pd);
36
37EOAPI EFL_VOID_FUNC_BODY(efl_canvas_object_simple_b_set);
38
39char *_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d); 35char *_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d);
40 36
41static char *__eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d) 37static 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
46 42
47EOAPI 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); 43EOAPI 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);
48 44
49int *_class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x);
50
51EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_bar, int *, NULL, EFL_FUNC_CALL(x), int x);
52
53static Eina_Bool 45static Eina_Bool
54_class_simple_class_initializer(Efl_Class *klass) 46_class_simple_class_initializer(Efl_Class *klass)
55{ 47{
@@ -64,9 +56,7 @@ _class_simple_class_initializer(Efl_Class *klass)
64 EFL_OPS_DEFINE(ops, 56 EFL_OPS_DEFINE(ops,
65 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_set, _class_simple_a_set), 57 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_set, _class_simple_a_set),
66 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_get, _class_simple_a_get), 58 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_get, _class_simple_a_get),
67 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_b_set, _class_simple_b_set),
68 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_foo, __eolian_class_simple_foo), 59 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_foo, __eolian_class_simple_foo),
69 EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_bar, _class_simple_bar),
70 CLASS_SIMPLE_EXTRA_OPS 60 CLASS_SIMPLE_EXTRA_OPS
71 ); 61 );
72 opsp = &ops; 62 opsp = &ops;
@@ -93,5 +83,3 @@ static const Efl_Class_Description _class_simple_class_desc = {
93}; 83};
94 84
95EFL_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL); 85EFL_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL);
96
97#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 @@
1
2EAPI void
3evas_object_simple_b_set(Class_Simple *obj)
4{
5 efl_canvas_object_simple_b_set(obj);
6}
7
8EAPI int *
9evas_object_simple_bar(Class_Simple *obj, int x)
10{
11 return efl_canvas_object_simple_bar(obj, x);
12}
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);
70EOAPI int efl_canvas_object_simple_a_get(const Eo *obj); 70EOAPI int efl_canvas_object_simple_a_get(const Eo *obj);
71#endif /* EFL_BETA_API_SUPPORT */ 71#endif /* EFL_BETA_API_SUPPORT */
72 72
73EOAPI void efl_canvas_object_simple_b_set(Eo *obj);
74
75#ifdef EFL_BETA_API_SUPPORT 73#ifdef EFL_BETA_API_SUPPORT
76/** 74/**
77 * @brief comment foo 75 * @brief comment foo
@@ -89,6 +87,4 @@ EOAPI void efl_canvas_object_simple_b_set(Eo *obj);
89EOAPI char *efl_canvas_object_simple_foo(Eo *obj, int a, char *b, double *c, int *d); 87EOAPI char *efl_canvas_object_simple_foo(Eo *obj, int a, char *b, double *c, int *d);
90#endif /* EFL_BETA_API_SUPPORT */ 88#endif /* EFL_BETA_API_SUPPORT */
91 89
92EOAPI int *efl_canvas_object_simple_bar(Eo *obj, int x);
93
94#endif 90#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 @@
1#ifndef _EOLIAN_CLASS_SIMPLE_EO_LEGACY_H_
2#define _EOLIAN_CLASS_SIMPLE_EO_LEGACY_H_
3
4#ifndef _CLASS_SIMPLE_EO_CLASS_TYPE
5#define _CLASS_SIMPLE_EO_CLASS_TYPE
6
7typedef Eo Class_Simple;
8
9#endif
10
11#ifndef _CLASS_SIMPLE_EO_TYPES
12#define _CLASS_SIMPLE_EO_TYPES
13
14#ifndef FOO
15/** doc for constant
16 *
17 * @ingroup Foo
18 */
19#define FOO 5
20#endif
21
22/** doc for global
23 *
24 * @ingroup Bar
25 */
26EWAPI extern float BAR;
27
28/** in header but not in source
29 *
30 * @ingroup Baz
31 */
32EWAPI extern long BAZ;
33
34
35#endif
36
37EAPI void evas_object_simple_b_set(Class_Simple *obj);
38
39EAPI int *evas_object_simple_bar(Class_Simple *obj, int x);
40
41#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 {
53 53
54 @since 1.18 54 @since 1.18
55 ]] 55 ]]
56 legacy_prefix: docs;
57 methods { 56 methods {
58 meth { 57 meth {
59 [[Method documentation.]] 58 [[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 @@
1#ifndef _EOLIAN_DOCS_EO_LEGACY_H_
2#define _EOLIAN_DOCS_EO_LEGACY_H_
3
4#ifndef _DOCS_EO_CLASS_TYPE
5#define _DOCS_EO_CLASS_TYPE
6
7typedef Eo Docs;
8
9#endif
10
11#ifndef _DOCS_EO_TYPES
12#define _DOCS_EO_TYPES
13
14/**
15 * @brief This is struct Foo. It does stuff.
16 *
17 * @note This is a note.
18 *
19 * This is a longer description for struct Foo.
20 *
21 * @warning This is a warning. You can only use Warning: and Note: at the
22 * beginning of a paragraph.
23 *
24 * This is another paragraph.
25 *
26 * @since 1.66
27 *
28 * @ingroup Foo
29 */
30typedef struct _Foo
31{
32 int field1; /**< Field documentation. */
33 float field2;
34 short field3; /**< Another field documentation. */
35} Foo;
36
37/** Docs for enum Bar.
38 *
39 * @ingroup Bar
40 */
41typedef enum
42{
43 BAR_BLAH = 0,
44 BAR_FOO = 1, /**< Docs for foo. */
45 BAR_BAR = 2 /**< Docs for bar. */
46} Bar;
47
48/**
49 * @brief Docs for typedef.
50 *
51 * More docs for typedef. See @ref Bar.
52 *
53 * @since 2.0
54 *
55 * @ingroup Alias
56 */
57typedef Bar Alias;
58
59/** Docs for var.
60 *
61 * @ingroup pants
62 */
63EWAPI extern int PANTS;
64
65/** Opaque struct docs. See @ref Foo for another struct.
66 *
67 * @ingroup Opaque
68 */
69typedef struct _Opaque Opaque;
70
71
72#endif
73
74/**
75 * @brief Method documentation.
76 *
77 * @param[in] obj The object.
78 * @param[in] a Param documentation.
79 * @param[out] b
80 * @param[out] c Another param documentation.
81 *
82 * @return Return documentation.
83 *
84 * @since 1.18
85 *
86 * @ingroup Docs_Group
87 */
88EAPI int docs_meth(Docs *obj, int a, float *b, long *c);
89
90/**
91 * @brief Property common documentation.
92 *
93 * Set documentation.
94 *
95 * @param[in] obj The object.
96 * @param[in] val Value documentation.
97 *
98 * @since 1.18
99 *
100 * @ingroup Docs_Group
101 */
102EAPI void docs_prop_set(Docs *obj, int val);
103
104/**
105 * @brief Property common documentation.
106 *
107 * Get documentation.
108 *
109 * @param[in] obj The object.
110 *
111 * @return Value documentation.
112 *
113 * @since 1.18
114 *
115 * @ingroup Docs_Group
116 */
117EAPI int docs_prop_get(const Docs *obj);
118
119#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)
141 _remove_ref(output_filepath, "eo.c"); 141 _remove_ref(output_filepath, "eo.c");
142 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gc", output_filepath)); 142 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gc", output_filepath));
143 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.c", output_filepath, "eo.c")); 143 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.c", output_filepath, "eo.c"));
144 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.legacy.c", output_filepath, "eo.legacy.c"));
145} 144}
146EFL_END_TEST 145EFL_END_TEST
147 146
@@ -164,9 +163,7 @@ EFL_START_TEST(eolian_functions_descriptions)
164 _remove_ref(output_filepath, "eo.h"); 163 _remove_ref(output_filepath, "eo.h");
165 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gh", output_filepath)); 164 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gh", output_filepath));
166 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h")); 165 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h"));
167 _remove_ref(output_filepath, "eo.legacy.h");
168 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gl", output_filepath)); 166 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gl", output_filepath));
169 fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_legacy.h", output_filepath, "eo.legacy.h"));
170} 167}
171EFL_END_TEST 168EFL_END_TEST
172 169
@@ -189,9 +186,7 @@ EFL_START_TEST(eolian_docs)
189 _remove_ref(output_filepath, "eo.h"); 186 _remove_ref(output_filepath, "eo.h");
190 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gh", output_filepath)); 187 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gh", output_filepath));
191 fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref.h", output_filepath, "eo.h")); 188 fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref.h", output_filepath, "eo.h"));
192 _remove_ref(output_filepath, "eo.legacy.h");
193 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gl", output_filepath)); 189 fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gl", output_filepath));
194 fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref_legacy.h", output_filepath, "eo.legacy.h"));
195} 190}
196EFL_END_TEST 191EFL_END_TEST
197 192
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)
563 fail_if(eolian_class_type_get(class) != EOLIAN_CLASS_REGULAR); 563 fail_if(eolian_class_type_get(class) != EOLIAN_CLASS_REGULAR);
564 fail_if(eolian_class_parent_get(class) != NULL); 564 fail_if(eolian_class_parent_get(class) != NULL);
565 fail_if(eolian_class_extensions_get(class) != NULL); 565 fail_if(eolian_class_extensions_get(class) != NULL);
566 fail_if(strcmp(eolian_class_legacy_prefix_get(class), "evas_object_simple"));
567 fail_if(strcmp(eolian_class_eo_prefix_get(class), "efl_canvas_object_simple")); 566 fail_if(strcmp(eolian_class_eo_prefix_get(class), "efl_canvas_object_simple"));
568 fail_if(strcmp(eolian_class_data_type_get(class), "Evas_Simple_Data")); 567 fail_if(strcmp(eolian_class_data_type_get(class), "Evas_Simple_Data"));
569 Eina_Stringshare *dt = eolian_class_c_data_type_get(class); 568 Eina_Stringshare *dt = eolian_class_c_data_type_get(class);
@@ -613,13 +612,6 @@ EFL_START_TEST(eolian_simple_parsing)
613 fail_if(v.type != EOLIAN_EXPR_INT); 612 fail_if(v.type != EOLIAN_EXPR_INT);
614 fail_if(v.value.i != 100); 613 fail_if(v.value.i != 100);
615 614
616 /* legacy only + c only */
617 fail_if(eolian_class_function_by_name_get(class, "b", EOLIAN_PROPERTY));
618 fail_if(!(fid = eolian_class_function_by_name_get(class, "b", EOLIAN_PROP_SET)));
619 fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET));
620 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET));
621 fail_if(eolian_function_is_beta(fid));
622
623 /* Method */ 615 /* Method */
624 fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD))); 616 fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD)));
625 fail_if(!eolian_function_is_beta(fid)); 617 fail_if(!eolian_function_is_beta(fid));
@@ -635,7 +627,6 @@ EFL_START_TEST(eolian_simple_parsing)
635 fail_if(!expr); 627 fail_if(!expr);
636 v = eolian_expression_eval(expr, EOLIAN_MASK_NULL); 628 v = eolian_expression_eval(expr, EOLIAN_MASK_NULL);
637 fail_if(v.type != EOLIAN_EXPR_NULL); 629 fail_if(v.type != EOLIAN_EXPR_NULL);
638 fail_if(eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
639 630
640 /* Function parameters */ 631 /* Function parameters */
641 fail_if(!(iter = eolian_function_parameters_get(fid))); 632 fail_if(!(iter = eolian_function_parameters_get(fid)));
@@ -666,12 +657,6 @@ EFL_START_TEST(eolian_simple_parsing)
666 fail_if(eina_iterator_next(iter, &dummy)); 657 fail_if(eina_iterator_next(iter, &dummy));
667 eina_iterator_free(iter); 658 eina_iterator_free(iter);
668 659
669 /* legacy only + c only */
670 fail_if(!(fid = eolian_class_function_by_name_get(class, "bar", EOLIAN_METHOD)));
671 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
672 fail_if(eolian_function_is_beta(fid));
673 fail_if(!eolian_type_is_ptr(eolian_function_return_type_get(fid, EOLIAN_METHOD)));
674
675 eolian_state_free(eos); 660 eolian_state_free(eos);
676} 661}
677EFL_END_TEST 662EFL_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 {
53 53
54 @since 1.17 54 @since 1.17
55 ]] 55 ]]
56 legacy_prefix: docs;
57 methods { 56 methods {
58 meth { 57 meth {
59 [[Method documentation.]] 58 [[Method documentation.]]