summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <daniel@octaforge.org>2019-03-08 08:17:01 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-03-08 08:17:01 -0500
commit1a17aff85ffca1cae6d71aa6273e6a8214154276 (patch)
tree00ab2bc42a75136d4778a8c0c57500072550742e /src/bin/eolian
parent23d0076346e64456280bd9b9c2d1d2659d065fd2 (diff)
eolian: add support for marking type declarations beta
Summary: This also simplifies the beta checking API by unifying it under objects (makes much more sense that way) and reworks the validator to have betaness support within its context state, allowing checks to be done easily in any place. The betaness checks are disabled for types for the time being, because otherwise there are too many errors (types are assumed to be stable as they are not tagged beta, but they reference beta classes all over the place). Set EOLIAN_TYPEDECL_BETA_WARN to 1 in your environment to force enable the checks. Reviewers: zmike, bu5hm4n, stefan_schmidt, lauromoura, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl, #eolian Differential Revision: https://phab.enlightenment.org/D8102
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/types.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index b8f7b98..d9a9bc2 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -156,6 +156,15 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
156 eina_strbuf_reset(buf); 156 eina_strbuf_reset(buf);
157 break; 157 break;
158 } 158 }
159 eina_strbuf_append_char(buf, ';');
160#if 0
161 /* can't enable this yet, as this would trigger brokenness in our tree */
162 if (eolian_typedecl_is_beta(tp))
163 {
164 eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
165 eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */");
166 }
167#endif
159 return buf; 168 return buf;
160} 169}
161 170
@@ -200,6 +209,11 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool le
200 eina_stringshare_del(ct); 209 eina_stringshare_del(ct);
201 } 210 }
202 free(fn); 211 free(fn);
212 if (eolian_variable_is_beta(vr))
213 {
214 eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
215 eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */");
216 }
203 return buf; 217 return buf;
204} 218}
205 219
@@ -252,7 +266,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
252 if (tbuf) 266 if (tbuf)
253 { 267 {
254 eina_strbuf_append(buf, eina_strbuf_string_get(tbuf)); 268 eina_strbuf_append(buf, eina_strbuf_string_get(tbuf));
255 eina_strbuf_append(buf, ";\n\n"); 269 eina_strbuf_append(buf, "\n\n");
256 eina_strbuf_free(tbuf); 270 eina_strbuf_free(tbuf);
257 } 271 }
258 } 272 }