summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-02-13 11:58:33 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-02-13 18:09:17 +0100
commit6b7346b7b2b0db05e76cc217966d3304e4cbc41a (patch)
tree20033403a3659e0db98c9e576e10470a4dd54170 /src/bin/eolian
parent56f06d21c19cddb056f6ced6822b275c08ebfc3a (diff)
Remove individual class BETA guards
Summary: Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged as @beta. This means that any app (and the EFL code) wanting to use BETA features has to enable them class by class, which is cumbersome. This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT guard, so apps only need to define one symbol to access BETA features. Any usage of the per-class guards has been removed from the EFL code and examples. When building EFL the global guard is defined by configure, so all EFL methods already have access to BETA API. Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to use BETA API have to define this symbol before including any EFL header (It has been added to the examples requiring it). Test Plan: make && make check && make examples still work, but there's a lot less #defines in the code Reviewers: zmike, bu5hm4n, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T6788 Differential Revision: https://phab.enlightenment.org/D7924
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/headers.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 70520fc..472043b 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -92,7 +92,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
92 92
93 /* this one will never be satisfied in legacy */ 93 /* this one will never be satisfied in legacy */
94 if (eolian_function_is_beta(fid)) 94 if (eolian_function_is_beta(fid))
95 eina_strbuf_append_printf(buf, "#ifdef %s_BETA\n", cnameu); 95 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
96 /* XXX: is this right? we expose potentially internal stuff into legacy */ 96 /* XXX: is this right? we expose potentially internal stuff into legacy */
97 if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) 97 if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
98 eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu); 98 eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
@@ -174,10 +174,10 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
174 } 174 }
175 eina_strbuf_append(buf, ";\n"); 175 eina_strbuf_append(buf, ";\n");
176 176
177 if (eolian_function_is_beta(fid))
178 eina_strbuf_append_printf(buf, "#endif\n");
179 if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) 177 if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
180 eina_strbuf_append_printf(buf, "#endif\n"); 178 eina_strbuf_append_printf(buf, "#endif\n");
179 if (eolian_function_is_beta(fid))
180 eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
181} 181}
182 182
183void 183void
@@ -267,7 +267,7 @@ events:
267 267
268 if (eolian_event_is_beta(ev)) 268 if (eolian_event_is_beta(ev))
269 { 269 {
270 eina_strbuf_append_printf(buf, "\n#ifdef %s_BETA\n", cnameu); 270 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
271 } 271 }
272 if (evs == EOLIAN_SCOPE_PROTECTED) 272 if (evs == EOLIAN_SCOPE_PROTECTED)
273 { 273 {
@@ -292,7 +292,7 @@ events:
292 if (evs == EOLIAN_SCOPE_PROTECTED) 292 if (evs == EOLIAN_SCOPE_PROTECTED)
293 eina_strbuf_append(buf, "#endif\n"); 293 eina_strbuf_append(buf, "#endif\n");
294 if (eolian_event_is_beta(ev)) 294 if (eolian_event_is_beta(ev))
295 eina_strbuf_append(buf, "#endif\n"); 295 eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
296 296
297 eina_stringshare_del(evn); 297 eina_stringshare_del(evn);
298 } 298 }