summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-03-05 16:03:23 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2019-03-08 13:35:38 +0100
commit2862eb3671c3dd1d3d46390072d2a0b691c41e36 (patch)
tree00ab2bc42a75136d4778a8c0c57500072550742e
parent23d0076346e64456280bd9b9c2d1d2659d065fd2 (diff)
eolian: add support for marking type declarations betadevs/q66/eolian-beta-types
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 Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8102
-rw-r--r--src/bin/eolian/types.c16
-rw-r--r--src/bindings/luajit/eolian.lua15
-rw-r--r--src/lib/eolian/Eolian.h66
-rw-r--r--src/lib/eolian/database_class_api.c7
-rw-r--r--src/lib/eolian/database_event_api.c7
-rw-r--r--src/lib/eolian/database_function_api.c7
-rw-r--r--src/lib/eolian/database_validate.c116
-rw-r--r--src/lib/eolian/eo_parser.c78
-rw-r--r--src/lib/eolian/eolian_database.c7
-rw-r--r--src/lib/eolian/eolian_database.h6
-rw-r--r--src/scripts/pyolian/eolian.py12
-rw-r--r--src/scripts/pyolian/eolian_lib.py12
12 files changed, 232 insertions, 117 deletions
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index b8f7b98452..d9a9bc2a45 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 }
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 0e72db3c05..e869950c94 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -295,6 +295,7 @@ ffi.cdef [[
295 const char *eolian_object_name_get(const Eolian_Object *obj); 295 const char *eolian_object_name_get(const Eolian_Object *obj);
296 const char *eolian_object_short_name_get(const Eolian_Object *obj); 296 const char *eolian_object_short_name_get(const Eolian_Object *obj);
297 Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj); 297 Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj);
298 Eina_Bool eolian_object_is_beta(const Eolian_Object *obj);
298 Eina_Bool eolian_state_directory_add(Eolian_State *state, const char *dir); 299 Eina_Bool eolian_state_directory_add(Eolian_State *state, const char *dir);
299 Eina_Bool eolian_state_system_directory_add(Eolian_State *state); 300 Eina_Bool eolian_state_system_directory_add(Eolian_State *state);
300 Eina_Iterator *eolian_state_eo_file_paths_get(const Eolian_State *state); 301 Eina_Iterator *eolian_state_eo_file_paths_get(const Eolian_State *state);
@@ -348,7 +349,6 @@ ffi.cdef [[
348 const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); 349 const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
349 Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype); 350 Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
350 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); 351 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
351 Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id);
352 Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); 352 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); 353 Eina_Bool eolian_function_is_function_pointer(const Eolian_Function *function_id);
354 Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); 354 Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
@@ -385,7 +385,6 @@ ffi.cdef [[
385 const Eolian_Class *eolian_event_class_get(const Eolian_Event *event); 385 const Eolian_Class *eolian_event_class_get(const Eolian_Event *event);
386 const Eolian_Documentation *eolian_event_documentation_get(const Eolian_Event *event); 386 const Eolian_Documentation *eolian_event_documentation_get(const Eolian_Event *event);
387 Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event); 387 Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
388 Eina_Bool eolian_event_is_beta(const Eolian_Event *event);
389 Eina_Bool eolian_event_is_hot(const Eolian_Event *event); 388 Eina_Bool eolian_event_is_hot(const Eolian_Event *event);
390 Eina_Bool eolian_event_is_restart(const Eolian_Event *event); 389 Eina_Bool eolian_event_is_restart(const Eolian_Event *event);
391 const char *eolian_event_c_name_get(const Eolian_Event *event); 390 const char *eolian_event_c_name_get(const Eolian_Event *event);
@@ -573,6 +572,10 @@ local object_idx, wrap_object = gen_wrap {
573 namespaces_get = function(self) 572 namespaces_get = function(self)
574 return iterator.String_Iterator( 573 return iterator.String_Iterator(
575 eolian.eolian_object_namespaces_get(cast_obj(self))) 574 eolian.eolian_object_namespaces_get(cast_obj(self)))
575 end,
576
577 is_beta = function(self)
578 return eolian.eolian_object_is_beta(cast_obj(self)) ~= 0
576 end 579 end
577} 580}
578 581
@@ -1089,10 +1092,6 @@ M.Function = ffi.metatype("Eolian_Function", {
1089 return eolian.eolian_function_is_class(self) ~= 0 1092 return eolian.eolian_function_is_class(self) ~= 0
1090 end, 1093 end,
1091 1094
1092 is_beta = function(self)
1093 return eolian.eolian_function_is_beta(self) ~= 0
1094 end,
1095
1096 is_constructor = function(self, klass) 1095 is_constructor = function(self, klass)
1097 return eolian.eolian_function_is_constructor(self, klass) ~= 0 1096 return eolian.eolian_function_is_constructor(self, klass) ~= 0
1098 end, 1097 end,
@@ -1289,10 +1288,6 @@ ffi.metatype("Eolian_Event", {
1289 return ffi_stringshare(v) 1288 return ffi_stringshare(v)
1290 end, 1289 end,
1291 1290
1292 is_beta = function(self)
1293 return eolian.eolian_event_is_beta(self) ~= 0
1294 end,
1295
1296 is_hot = function(self) 1291 is_hot = function(self)
1297 return eolian.eolian_event_is_hot(self) ~= 0 1292 return eolian.eolian_event_is_hot(self) ~= 0
1298 end, 1293 end,
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index aebe165f57..77a5c1843a 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -703,6 +703,19 @@ EAPI const char *eolian_object_short_name_get(const Eolian_Object *obj);
703EAPI Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj); 703EAPI Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj);
704 704
705/* 705/*
706 * @brief Get whether an object is beta.
707 *
708 * This applies to toplevel objects (classes, types) as well as some
709 * others such as functions and events.
710 *
711 * @param[in] obj The object.
712 * @return EINA_TRUE and EINA_FALSE respectively
713 *
714 * @ingroup Eolian
715 */
716EAPI Eina_Bool eolian_object_is_beta(const Eolian_Object *obj);
717
718/*
706 * @brief Scan the given directory for .eo and .eot files. 719 * @brief Scan the given directory for .eo and .eot files.
707 * 720 *
708 * You need to add every directory you plan to use .eo/.eot files from. 721 * You need to add every directory you plan to use .eo/.eot files from.
@@ -1628,12 +1641,15 @@ EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
1628/* 1641/*
1629 * @brief Get whether a function is beta. 1642 * @brief Get whether a function is beta.
1630 * 1643 *
1631 * @param[in] function_id Id of the function 1644 * @see eolian_object_is_beta
1632 * @return EINA_TRUE and EINA_FALSE respectively
1633 * 1645 *
1634 * @ingroup Eolian 1646 * @ingroup Eolian
1635 */ 1647 */
1636EAPI Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id); 1648static inline Eina_Bool
1649eolian_function_is_beta(const Eolian_Function *function_id)
1650{
1651 return eolian_object_is_beta(EOLIAN_OBJECT(function_id));
1652}
1637 1653
1638/* 1654/*
1639 * @brief Indicates if a function is a constructing function of a given class. 1655 * @brief Indicates if a function is a constructing function of a given class.
@@ -2133,12 +2149,15 @@ EAPI Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
2133/* 2149/*
2134 * @brief Get whether an event is beta. 2150 * @brief Get whether an event is beta.
2135 * 2151 *
2136 * @param[in] event the event handle 2152 * @see eolian_object_is_beta
2137 * @return EINA_TRUE and EINA_FALSE respectively
2138 * 2153 *
2139 * @ingroup Eolian 2154 * @ingroup Eolian
2140 */ 2155 */
2141EAPI Eina_Bool eolian_event_is_beta(const Eolian_Event *event); 2156static inline Eina_Bool
2157eolian_event_is_beta(const Eolian_Event *event)
2158{
2159 return eolian_object_is_beta(EOLIAN_OBJECT(event));
2160}
2142 2161
2143/* 2162/*
2144 * @brief Get whether an event is hot (unfreezable). 2163 * @brief Get whether an event is hot (unfreezable).
@@ -2303,12 +2322,15 @@ EAPI Eina_Stringshare *eolian_class_c_data_type_get(const Eolian_Class *klass);
2303/* 2322/*
2304 * @brief Get whether a class is beta. 2323 * @brief Get whether a class is beta.
2305 * 2324 *
2306 * @param[in] klass the class 2325 * @see eolian_object_is_beta
2307 * @return EINA_TRUE if the class has been marked as BETA
2308 * 2326 *
2309 * @ingroup Eolian 2327 * @ingroup Eolian
2310 */ 2328 */
2311EAPI Eina_Bool eolian_class_is_beta(const Eolian_Class *klass); 2329static inline Eina_Bool
2330eolian_class_is_beta(const Eolian_Class *klass)
2331{
2332 return eolian_object_is_beta(EOLIAN_OBJECT(klass));
2333}
2312 2334
2313/* 2335/*
2314 * @brief Get the type of a type declaration. 2336 * @brief Get the type of a type declaration.
@@ -2506,6 +2528,19 @@ EAPI const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl *
2506EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp); 2528EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
2507 2529
2508/* 2530/*
2531 * @brief Get whether a typedecl is beta.
2532 *
2533 * @see eolian_object_is_beta
2534 *
2535 * @ingroup Eolian
2536 */
2537static inline Eina_Bool
2538eolian_typedecl_is_beta(const Eolian_Typedecl *tp)
2539{
2540 return eolian_object_is_beta(EOLIAN_OBJECT(tp));
2541}
2542
2543/*
2509 * @brief Get the full C type name of the given type. 2544 * @brief Get the full C type name of the given type.
2510 * 2545 *
2511 * @param[in] tp the type declaration. 2546 * @param[in] tp the type declaration.
@@ -3007,6 +3042,19 @@ eolian_variable_namespaces_get(const Eolian_Variable *tp)
3007EAPI Eina_Bool eolian_variable_is_extern(const Eolian_Variable *var); 3042EAPI Eina_Bool eolian_variable_is_extern(const Eolian_Variable *var);
3008 3043
3009/* 3044/*
3045 * @brief Get whether a variable is beta.
3046 *
3047 * @see eolian_object_is_beta
3048 *
3049 * @ingroup Eolian
3050 */
3051static inline Eina_Bool
3052eolian_variable_is_beta(const Eolian_Variable *var)
3053{
3054 return eolian_object_is_beta(EOLIAN_OBJECT(var));
3055}
3056
3057/*
3010 * @brief Get the summary of the documentation. 3058 * @brief Get the summary of the documentation.
3011 * 3059 *
3012 * This should never return NULL unless the input is invalid. 3060 * This should never return NULL unless the input is invalid.
diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c
index 73d013672b..f79cdb800b 100644
--- a/src/lib/eolian/database_class_api.c
+++ b/src/lib/eolian/database_class_api.c
@@ -228,10 +228,3 @@ eolian_class_c_data_type_get(const Eolian_Class *cl)
228 *p = '_'; 228 *p = '_';
229 return eina_stringshare_add(buf); 229 return eina_stringshare_add(buf);
230} 230}
231
232EAPI Eina_Bool
233eolian_class_is_beta(const Eolian_Class *cl)
234{
235 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, EINA_FALSE);
236 return cl->is_beta;
237}
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 97c8df8b9c..74f69cd411 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -36,13 +36,6 @@ eolian_event_scope_get(const Eolian_Event *event)
36} 36}
37 37
38EAPI Eina_Bool 38EAPI Eina_Bool
39eolian_event_is_beta(const Eolian_Event *event)
40{
41 EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE);
42 return event->is_beta;
43}
44
45EAPI Eina_Bool
46eolian_event_is_hot(const Eolian_Event *event) 39eolian_event_is_hot(const Eolian_Event *event)
47{ 40{
48 EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE); 41 EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE);
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index 05e7bf9e51..9e7135b96e 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -394,10 +394,3 @@ eolian_function_class_get(const Eolian_Function *fid)
394 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL); 394 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
395 return fid->klass; 395 return fid->klass;
396} 396}
397
398EAPI Eina_Bool
399eolian_function_is_beta(const Eolian_Function *fid)
400{
401 EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
402 return fid->is_beta;
403}
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index cdc31b0ebb..665f095817 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -11,11 +11,28 @@
11typedef struct _Validate_State 11typedef struct _Validate_State
12{ 12{
13 Eina_Bool warned; 13 Eina_Bool warned;
14 Eina_Bool stable;
14 Eina_Bool event_redef; 15 Eina_Bool event_redef;
15 Eina_Bool unimplemented; 16 Eina_Bool unimplemented;
17 Eina_Bool beta_types;
16} Validate_State; 18} Validate_State;
17 19
18static Eina_Bool 20static Eina_Bool
21_set_stable(Validate_State *vals, Eina_Bool newval)
22{
23 Eina_Bool ret = vals->stable;
24 vals->stable = newval;
25 return ret;
26}
27
28static Eina_Bool
29_reset_stable(Validate_State *vals, Eina_Bool oldval, Eina_Bool ret)
30{
31 vals->stable = oldval;
32 return ret;
33}
34
35static Eina_Bool
19_validate(Eolian_Object *obj) 36_validate(Eolian_Object *obj)
20{ 37{
21 obj->validated = EINA_TRUE; 38 obj->validated = EINA_TRUE;
@@ -79,21 +96,6 @@ _class_is_legacy(Eolian_Class *klass)
79} 96}
80 97
81static Eina_Bool 98static Eina_Bool
82_validate_beta_usage(Eolian_Class *klass, Eolian_Type *type)
83{
84 if (!klass) return EINA_TRUE;
85 if (_class_is_legacy(klass)) return EINA_TRUE;
86 if (klass->is_beta) return EINA_TRUE;
87
88 if (type->type == EOLIAN_TYPE_CLASS && type->klass->is_beta)
89 {
90 _eo_parser_log(&type->base, "beta class used in public API");
91 return EINA_FALSE;
92 }
93 return EINA_TRUE;
94}
95
96static Eina_Bool
97_validate_doc(Eolian_Documentation *doc) 99_validate_doc(Eolian_Documentation *doc)
98{ 100{
99 if (!doc) 101 if (!doc)
@@ -163,39 +165,48 @@ _validate_typedecl(Validate_State *vals, Eolian_Typedecl *tp)
163 if (!_validate_doc(tp->doc)) 165 if (!_validate_doc(tp->doc))
164 return EINA_FALSE; 166 return EINA_FALSE;
165 167
168 /* for the time being assume all typedecls are beta unless overridden */
169 Eina_Bool was_stable = _set_stable(vals, !tp->base.is_beta && vals->beta_types);
170
166 switch (tp->type) 171 switch (tp->type)
167 { 172 {
168 case EOLIAN_TYPEDECL_ALIAS: 173 case EOLIAN_TYPEDECL_ALIAS:
169 if (!_validate_type(vals, tp->base_type)) 174 if (!_validate_type(vals, tp->base_type))
170 return EINA_FALSE; 175 return _reset_stable(vals, was_stable, EINA_FALSE);
171 if (!tp->freefunc && tp->base_type->freefunc) 176 if (!tp->freefunc && tp->base_type->freefunc)
172 tp->freefunc = eina_stringshare_ref(tp->base_type->freefunc); 177 tp->freefunc = eina_stringshare_ref(tp->base_type->freefunc);
178 _reset_stable(vals, was_stable, EINA_TRUE);
173 return _validate(&tp->base); 179 return _validate(&tp->base);
174 case EOLIAN_TYPEDECL_STRUCT: 180 case EOLIAN_TYPEDECL_STRUCT:
175 { 181 {
176 Cb_Ret rt = { vals, EINA_TRUE }; 182 Cb_Ret rt = { vals, EINA_TRUE };
177 eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_sf_map_cb, &rt); 183 eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_sf_map_cb, &rt);
178 if (!rt.succ) 184 if (!rt.succ)
179 return EINA_FALSE; 185 return _reset_stable(vals, was_stable, EINA_FALSE);
186 _reset_stable(vals, was_stable, EINA_TRUE);
180 return _validate(&tp->base); 187 return _validate(&tp->base);
181 } 188 }
182 case EOLIAN_TYPEDECL_STRUCT_OPAQUE: 189 case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
190 _reset_stable(vals, was_stable, EINA_TRUE);
183 return _validate(&tp->base); 191 return _validate(&tp->base);
184 case EOLIAN_TYPEDECL_ENUM: 192 case EOLIAN_TYPEDECL_ENUM:
185 { 193 {
186 Cb_Ret rt = { vals, EINA_TRUE }; 194 Cb_Ret rt = { vals, EINA_TRUE };
187 eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_ef_map_cb, &rt); 195 eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_ef_map_cb, &rt);
188 if (!rt.succ) 196 if (!rt.succ)
189 return EINA_FALSE; 197 return _reset_stable(vals, was_stable, EINA_FALSE);
198 _reset_stable(vals, was_stable, EINA_TRUE);
190 return _validate(&tp->base); 199 return _validate(&tp->base);
191 } 200 }
192 case EOLIAN_TYPEDECL_FUNCTION_POINTER: 201 case EOLIAN_TYPEDECL_FUNCTION_POINTER:
193 if (!_validate_function(vals, tp->function_pointer, NULL)) 202 if (!_validate_function(vals, tp->function_pointer, NULL))
194 return EINA_FALSE; 203 return _reset_stable(vals, was_stable, EINA_FALSE);
204 _reset_stable(vals, was_stable, EINA_TRUE);
195 return _validate(&tp->base); 205 return _validate(&tp->base);
196 default: 206 default:
197 return EINA_FALSE; 207 return _reset_stable(vals, was_stable, EINA_FALSE);
198 } 208 }
209 _reset_stable(vals, was_stable, EINA_TRUE);
199 return _validate(&tp->base); 210 return _validate(&tp->base);
200} 211}
201 212
@@ -316,6 +327,13 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
316 _eo_parser_log(&tp->base, "undefined type %s", tp->base.name); 327 _eo_parser_log(&tp->base, "undefined type %s", tp->base.name);
317 return EINA_FALSE; 328 return EINA_FALSE;
318 } 329 }
330 else if (vals->stable && tp->tdecl->base.is_beta && vals->beta_types)
331 {
332 /* we should enable this by default, but can't for now */
333 _eo_parser_log(&tp->base, "beta type declaration '%s' used in stable context",
334 tp->tdecl->base.name);
335 return EINA_FALSE;
336 }
319 if (!_validate_typedecl(vals, tp->tdecl)) 337 if (!_validate_typedecl(vals, tp->tdecl))
320 return EINA_FALSE; 338 return EINA_FALSE;
321 if (tp->tdecl->freefunc && !tp->freefunc) 339 if (tp->tdecl->freefunc && !tp->freefunc)
@@ -331,6 +349,12 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
331 "(likely wrong namespacing)", tp->base.name); 349 "(likely wrong namespacing)", tp->base.name);
332 return EINA_FALSE; 350 return EINA_FALSE;
333 } 351 }
352 else if (vals->stable && tp->klass->base.is_beta)
353 {
354 _eo_parser_log(&tp->base, "beta class '%s' used in stable context",
355 tp->klass->base.name);
356 return EINA_FALSE;
357 }
334 if (!tp->freefunc) 358 if (!tp->freefunc)
335 tp->freefunc = eina_stringshare_add(eo_obj_free); 359 tp->freefunc = eina_stringshare_add(eo_obj_free);
336 return _validate_ownable(tp); 360 return _validate_ownable(tp);
@@ -383,7 +407,7 @@ _validate_function(Validate_State *vals, Eolian_Function *func, Eina_Hash *nhash
383 { 407 {
384 _eo_parser_log(&func->base, 408 _eo_parser_log(&func->base,
385 "%sfunction '%s' conflicts with another symbol (at %s:%d:%d)", 409 "%sfunction '%s' conflicts with another symbol (at %s:%d:%d)",
386 func->is_beta ? "beta " : "", func->base.name, oobj->file, 410 func->base.is_beta ? "beta " : "", func->base.name, oobj->file,
387 oobj->line, oobj->column); 411 oobj->line, oobj->column);
388 vals->warned = EINA_TRUE; 412 vals->warned = EINA_TRUE;
389 } 413 }
@@ -399,24 +423,27 @@ _validate_function(Validate_State *vals, Eolian_Function *func, Eina_Hash *nhash
399 return EINA_TRUE; 423 return EINA_TRUE;
400 } 424 }
401 425
402 if (func->get_ret_type && (!_validate_type(vals, func->get_ret_type) || !_validate_beta_usage(func->klass, func->get_ret_type))) 426 /* need to preserve stable flag set from the class */
403 return EINA_FALSE; 427 Eina_Bool was_stable = _set_stable(vals, !func->base.is_beta && vals->stable);
404 428
405 if (func->set_ret_type && (!_validate_type(vals, func->set_ret_type) || !_validate_beta_usage(func->klass, func->set_ret_type))) 429 if (func->get_ret_type && !_validate_type(vals, func->get_ret_type))
406 return EINA_FALSE; 430 return _reset_stable(vals, was_stable, EINA_FALSE);
431
432 if (func->set_ret_type && !_validate_type(vals, func->set_ret_type))
433 return _reset_stable(vals, was_stable, EINA_FALSE);
407 434
408 if (func->get_ret_val && !_validate_expr(func->get_ret_val, 435 if (func->get_ret_val && !_validate_expr(func->get_ret_val,
409 func->get_ret_type, 0)) 436 func->get_ret_type, 0))
410 return EINA_FALSE; 437 return _reset_stable(vals, was_stable, EINA_FALSE);
411 438
412 if (func->set_ret_val && !_validate_expr(func->set_ret_val, 439 if (func->set_ret_val && !_validate_expr(func->set_ret_val,
413 func->set_ret_type, 0)) 440 func->set_ret_type, 0))
414 return EINA_FALSE; 441 return _reset_stable(vals, was_stable, EINA_FALSE);
415 442
416#define EOLIAN_PARAMS_VALIDATE(params) \ 443#define EOLIAN_PARAMS_VALIDATE(params) \
417 EINA_LIST_FOREACH(params, l, param) \ 444 EINA_LIST_FOREACH(params, l, param) \
418 if (!_validate_param(vals, param) || !_validate_beta_usage(func->klass, param->type)) \ 445 if (!_validate_param(vals, param)) \
419 return EINA_FALSE; 446 return _reset_stable(vals, was_stable, EINA_FALSE);
420 447
421 EOLIAN_PARAMS_VALIDATE(func->prop_values); 448 EOLIAN_PARAMS_VALIDATE(func->prop_values);
422 EOLIAN_PARAMS_VALIDATE(func->prop_values_get); 449 EOLIAN_PARAMS_VALIDATE(func->prop_values_get);
@@ -428,14 +455,15 @@ _validate_function(Validate_State *vals, Eolian_Function *func, Eina_Hash *nhash
428#undef EOLIAN_PARAMS_VALIDATE 455#undef EOLIAN_PARAMS_VALIDATE
429 456
430 if (!_validate_doc(func->get_return_doc)) 457 if (!_validate_doc(func->get_return_doc))
431 return EINA_FALSE; 458 return _reset_stable(vals, was_stable, EINA_FALSE);
432 if (!_validate_doc(func->set_return_doc)) 459 if (!_validate_doc(func->set_return_doc))
433 return EINA_FALSE; 460 return _reset_stable(vals, was_stable, EINA_FALSE);
434 461
435 /* just for now, when dups become errors there will be no need to check */ 462 /* just for now, when dups become errors there will be no need to check */
436 if (!oobj && nhash) 463 if (!oobj && nhash)
437 eina_hash_add(nhash, &func->base.name, &func->base); 464 eina_hash_add(nhash, &func->base.name, &func->base);
438 465
466 _reset_stable(vals, was_stable, EINA_TRUE);
439 return _validate(&func->base); 467 return _validate(&func->base);
440} 468}
441 469
@@ -503,15 +531,18 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
503 return EINA_TRUE; 531 return EINA_TRUE;
504 } 532 }
505 533
506 if (!_validate_type(vals, event->type) || !_validate_beta_usage(event->klass, event->type)) 534 Eina_Bool was_stable = _set_stable(vals, !event->base.is_beta && vals->stable);
507 return EINA_FALSE; 535
536 if (!_validate_type(vals, event->type))
537 return _reset_stable(vals, was_stable, EINA_FALSE);
508 538
509 if (!_validate_doc(event->doc)) 539 if (!_validate_doc(event->doc))
510 return EINA_FALSE; 540 return _reset_stable(vals, was_stable, EINA_FALSE);
511 541
512 if (vals->event_redef && !oobj) 542 if (vals->event_redef && !oobj)
513 eina_hash_add(nhash, &event->base.name, &event->base); 543 eina_hash_add(nhash, &event->base.name, &event->base);
514 544
545 _reset_stable(vals, was_stable, EINA_TRUE);
515 return _validate(&event->base); 546 return _validate(&event->base);
516} 547}
517 548
@@ -1180,7 +1211,7 @@ _validate_class(Validate_State *vals, Eolian_Class *cl,
1180 default: 1211 default:
1181 break; 1212 break;
1182 } 1213 }
1183 if (!_class_is_legacy(cl) && !cl->is_beta && cl->parent->is_beta) 1214 if (!_class_is_legacy(cl) && !cl->base.is_beta && cl->parent->base.is_beta)
1184 { 1215 {
1185 _eo_parser_log(&cl->base, "non-beta class cannot have beta parent"); 1216 _eo_parser_log(&cl->base, "non-beta class cannot have beta parent");
1186 return EINA_FALSE; 1217 return EINA_FALSE;
@@ -1247,6 +1278,8 @@ _validate_class(Validate_State *vals, Eolian_Class *cl,
1247 } 1278 }
1248 } 1279 }
1249 1280
1281 /* we are not verifying betaness for any legacy class */
1282 _set_stable(vals, !cl->base.is_beta && !_class_is_legacy(cl));
1250 1283
1251 EINA_LIST_FOREACH(cl->properties, l, func) 1284 EINA_LIST_FOREACH(cl->properties, l, func)
1252 if (!_validate_function(vals, func, nhash)) 1285 if (!_validate_function(vals, func, nhash))
@@ -1291,15 +1324,18 @@ _validate_variable(Validate_State *vals, Eolian_Variable *var)
1291 if (var->base.validated) 1324 if (var->base.validated)
1292 return EINA_TRUE; 1325 return EINA_TRUE;
1293 1326
1327 Eina_Bool was_stable = _set_stable(vals, !var->base.is_beta && vals->stable);
1328
1294 if (!_validate_type(vals, var->base_type)) 1329 if (!_validate_type(vals, var->base_type))
1295 return EINA_FALSE; 1330 return _reset_stable(vals, was_stable, EINA_FALSE);
1296 1331
1297 if (var->value && !_validate_expr(var->value, var->base_type, 0)) 1332 if (var->value && !_validate_expr(var->value, var->base_type, 0))
1298 return EINA_FALSE; 1333 return _reset_stable(vals, was_stable, EINA_FALSE);
1299 1334
1300 if (!_validate_doc(var->doc)) 1335 if (!_validate_doc(var->doc))
1301 return EINA_FALSE; 1336 return _reset_stable(vals, was_stable, EINA_FALSE);
1302 1337
1338 _reset_stable(vals, was_stable, EINA_TRUE);
1303 return _validate(&var->base); 1339 return _validate(&var->base);
1304} 1340}
1305 1341
@@ -1324,8 +1360,10 @@ database_validate(const Eolian_Unit *src)
1324 1360
1325 Validate_State vals = { 1361 Validate_State vals = {
1326 EINA_FALSE, 1362 EINA_FALSE,
1363 EINA_TRUE,
1327 !!getenv("EOLIAN_EVENT_REDEF_WARN"), 1364 !!getenv("EOLIAN_EVENT_REDEF_WARN"),
1328 !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN") 1365 !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"),
1366 !!getenv("EOLIAN_TYPEDECL_BETA_WARN")
1329 }; 1367 };
1330 1368
1331 /* do an initial pass to refill inherits */ 1369 /* do an initial pass to refill inherits */
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 626e75b2ab..6de91efc15 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -433,11 +433,12 @@ _struct_field_free(Eolian_Struct_Type_Field *def)
433 433
434static Eolian_Typedecl * 434static Eolian_Typedecl *
435parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, 435parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern,
436 int line, int column, const char *freefunc) 436 Eina_Bool is_beta, int line, int column, const char *freefunc)
437{ 437{
438 int bline = ls->line_number, bcolumn = ls->column; 438 int bline = ls->line_number, bcolumn = ls->column;
439 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); 439 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls);
440 def->is_extern = is_extern; 440 def->is_extern = is_extern;
441 def->base.is_beta = is_beta;
441 def->base.name = name; 442 def->base.name = name;
442 def->type = EOLIAN_TYPEDECL_STRUCT; 443 def->type = EOLIAN_TYPEDECL_STRUCT;
443 def->fields = eina_hash_string_small_new(EINA_FREE_CB(_struct_field_free)); 444 def->fields = eina_hash_string_small_new(EINA_FREE_CB(_struct_field_free));
@@ -491,11 +492,12 @@ _enum_field_free(Eolian_Enum_Type_Field *def)
491 492
492static Eolian_Typedecl * 493static Eolian_Typedecl *
493parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, 494parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool is_extern,
494 int line, int column) 495 Eina_Bool is_beta, int line, int column)
495{ 496{
496 int bline = ls->line_number, bcolumn = ls->column; 497 int bline = ls->line_number, bcolumn = ls->column;
497 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); 498 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls);
498 def->is_extern = is_extern; 499 def->is_extern = is_extern;
500 def->base.is_beta = is_beta;
499 def->base.name = name; 501 def->base.name = name;
500 def->type = EOLIAN_TYPEDECL_ENUM; 502 def->type = EOLIAN_TYPEDECL_ENUM;
501 def->fields = eina_hash_string_small_new(EINA_FREE_CB(_enum_field_free)); 503 def->fields = eina_hash_string_small_new(EINA_FREE_CB(_enum_field_free));
@@ -747,11 +749,23 @@ parse_typedef(Eo_Lexer *ls)
747 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); 749 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls);
748 Eina_Strbuf *buf; 750 Eina_Strbuf *buf;
749 eo_lexer_get(ls); 751 eo_lexer_get(ls);
750 if (ls->t.kw == KW_at_extern) 752 Eina_Bool has_extern = EINA_FALSE, has_beta = EINA_FALSE;
753 for (;;) switch (ls->t.kw)
751 { 754 {
755 case KW_at_extern:
756 CASE_LOCK(ls, extern, "extern qualifier");
752 def->is_extern = EINA_TRUE; 757 def->is_extern = EINA_TRUE;
753 eo_lexer_get(ls); 758 eo_lexer_get(ls);
759 break;
760 case KW_at_beta:
761 CASE_LOCK(ls, beta, "beta qualifier");
762 def->base.is_beta = EINA_TRUE;
763 eo_lexer_get(ls);
764 break;
765 default:
766 goto tags_done;
754 } 767 }
768tags_done:
755 def->type = EOLIAN_TYPEDECL_ALIAS; 769 def->type = EOLIAN_TYPEDECL_ALIAS;
756 buf = eina_strbuf_new(); 770 buf = eina_strbuf_new();
757 eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); 771 eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf);
@@ -780,11 +794,23 @@ parse_variable(Eo_Lexer *ls, Eina_Bool global)
780 Eolian_Variable *def = eo_lexer_variable_new(ls); 794 Eolian_Variable *def = eo_lexer_variable_new(ls);
781 Eina_Strbuf *buf; 795 Eina_Strbuf *buf;
782 eo_lexer_get(ls); 796 eo_lexer_get(ls);
783 if (ls->t.kw == KW_at_extern) 797 Eina_Bool has_extern = EINA_FALSE, has_beta = EINA_FALSE;
798 for (;;) switch (ls->t.kw)
784 { 799 {
800 case KW_at_extern:
801 CASE_LOCK(ls, extern, "extern qualifier");
785 def->is_extern = EINA_TRUE; 802 def->is_extern = EINA_TRUE;
786 eo_lexer_get(ls); 803 eo_lexer_get(ls);
804 break;
805 case KW_at_beta:
806 CASE_LOCK(ls, beta, "beta qualifier");
807 def->base.is_beta = EINA_TRUE;
808 eo_lexer_get(ls);
809 break;
810 default:
811 goto tags_done;
787 } 812 }
813tags_done:
788 def->type = global ? EOLIAN_VAR_GLOBAL : EOLIAN_VAR_CONSTANT; 814 def->type = global ? EOLIAN_VAR_GLOBAL : EOLIAN_VAR_CONSTANT;
789 buf = eina_strbuf_new(); 815 buf = eina_strbuf_new();
790 eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); 816 eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf);
@@ -1189,7 +1215,7 @@ parse_property(Eo_Lexer *ls)
1189 break; 1215 break;
1190 case KW_at_beta: 1216 case KW_at_beta:
1191 CASE_LOCK(ls, beta, "beta qualifier"); 1217 CASE_LOCK(ls, beta, "beta qualifier");
1192 prop->is_beta = EINA_TRUE; 1218 prop->base.is_beta = EINA_TRUE;
1193 eo_lexer_get(ls); 1219 eo_lexer_get(ls);
1194 break; 1220 break;
1195 case KW_at_pure_virtual: 1221 case KW_at_pure_virtual:
@@ -1255,10 +1281,23 @@ parse_function_pointer(Eo_Lexer *ls)
1255 eo_lexer_get(ls); 1281 eo_lexer_get(ls);
1256 1282
1257 def->type = EOLIAN_TYPEDECL_FUNCTION_POINTER; 1283 def->type = EOLIAN_TYPEDECL_FUNCTION_POINTER;
1258 def->is_extern = (ls->t.kw == KW_at_extern); 1284 Eina_Bool has_extern = EINA_FALSE, has_beta = EINA_FALSE;
1259 if (def->is_extern) 1285 for (;;) switch (ls->t.kw)
1260 eo_lexer_get(ls); 1286 {
1261 1287 case KW_at_extern:
1288 CASE_LOCK(ls, extern, "extern qualifier");
1289 def->is_extern = EINA_TRUE;
1290 eo_lexer_get(ls);
1291 break;
1292 case KW_at_beta:
1293 CASE_LOCK(ls, beta, "beta qualifier");
1294 def->base.is_beta = EINA_TRUE;
1295 eo_lexer_get(ls);
1296 break;
1297 default:
1298 goto tags_done;
1299 }
1300tags_done:
1262 parse_name(ls, buf); 1301 parse_name(ls, buf);
1263 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); 1302 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
1264 eo_lexer_dtor_pop(ls); 1303 eo_lexer_dtor_pop(ls);
@@ -1272,8 +1311,8 @@ parse_function_pointer(Eo_Lexer *ls)
1272 def->function_pointer = meth; 1311 def->function_pointer = meth;
1273 eolian_object_ref(&meth->base); 1312 eolian_object_ref(&meth->base);
1274 1313
1275 meth->is_beta = (ls->t.kw == KW_at_beta); 1314 meth->base.is_beta = (ls->t.kw == KW_at_beta);
1276 if (meth->is_beta) 1315 if (meth->base.is_beta)
1277 eo_lexer_get(ls); 1316 eo_lexer_get(ls);
1278 1317
1279 bline = ls->line_number; 1318 bline = ls->line_number;
@@ -1359,7 +1398,7 @@ parse_method(Eo_Lexer *ls)
1359 break; 1398 break;
1360 case KW_at_beta: 1399 case KW_at_beta:
1361 CASE_LOCK(ls, beta, "beta qualifier"); 1400 CASE_LOCK(ls, beta, "beta qualifier");
1362 meth->is_beta = EINA_TRUE; 1401 meth->base.is_beta = EINA_TRUE;
1363 eo_lexer_get(ls); 1402 eo_lexer_get(ls);
1364 break; 1403 break;
1365 case KW_at_pure_virtual: 1404 case KW_at_pure_virtual:
@@ -1718,7 +1757,7 @@ parse_event(Eo_Lexer *ls)
1718 break; 1757 break;
1719 case KW_at_beta: 1758 case KW_at_beta:
1720 CASE_LOCK(ls, beta, "beta qualifier") 1759 CASE_LOCK(ls, beta, "beta qualifier")
1721 ev->is_beta = EINA_TRUE; 1760 ev->base.is_beta = EINA_TRUE;
1722 eo_lexer_get(ls); 1761 eo_lexer_get(ls);
1723 break; 1762 break;
1724 case KW_at_hot: 1763 case KW_at_hot:
@@ -2060,7 +2099,7 @@ parse_class(Eo_Lexer *ls, Eolian_Class_Type type)
2060 eo_lexer_context_push(ls); 2099 eo_lexer_context_push(ls);
2061 if (ls->t.kw == KW_at_beta) 2100 if (ls->t.kw == KW_at_beta)
2062 { 2101 {
2063 ls->klass->is_beta = EINA_TRUE; 2102 ls->klass->base.is_beta = EINA_TRUE;
2064 eo_lexer_get(ls); 2103 eo_lexer_get(ls);
2065 } 2104 }
2066 parse_name(ls, buf); 2105 parse_name(ls, buf);
@@ -2212,13 +2251,17 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
2212 const char *freefunc = NULL; 2251 const char *freefunc = NULL;
2213 Eina_Strbuf *buf; 2252 Eina_Strbuf *buf;
2214 eo_lexer_get(ls); 2253 eo_lexer_get(ls);
2215 Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE; 2254 Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE, has_beta = EINA_FALSE;
2216 for (;;) switch (ls->t.kw) 2255 for (;;) switch (ls->t.kw)
2217 { 2256 {
2218 case KW_at_extern: 2257 case KW_at_extern:
2219 CASE_LOCK(ls, extern, "@extern qualifier") 2258 CASE_LOCK(ls, extern, "@extern qualifier")
2220 eo_lexer_get(ls); 2259 eo_lexer_get(ls);
2221 break; 2260 break;
2261 case KW_at_beta:
2262 CASE_LOCK(ls, beta, "@beta qualifier")
2263 eo_lexer_get(ls);
2264 break;
2222 case KW_at_free: 2265 case KW_at_free:
2223 { 2266 {
2224 if (is_enum) 2267 if (is_enum)
@@ -2264,6 +2307,7 @@ postparams:
2264 { 2307 {
2265 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); 2308 Eolian_Typedecl *def = eo_lexer_typedecl_new(ls);
2266 def->is_extern = has_extern; 2309 def->is_extern = has_extern;
2310 def->base.is_beta = has_beta;
2267 def->type = EOLIAN_TYPEDECL_STRUCT_OPAQUE; 2311 def->type = EOLIAN_TYPEDECL_STRUCT_OPAQUE;
2268 if (freefunc) 2312 if (freefunc)
2269 { 2313 {
@@ -2278,9 +2322,9 @@ postparams:
2278 break; 2322 break;
2279 } 2323 }
2280 if (is_enum) 2324 if (is_enum)
2281 parse_enum(ls, name, has_extern, line, col); 2325 parse_enum(ls, name, has_extern, has_beta, line, col);
2282 else 2326 else
2283 parse_struct(ls, name, has_extern, line, col, freefunc); 2327 parse_struct(ls, name, has_extern, has_beta, line, col, freefunc);
2284 break; 2328 break;
2285 } 2329 }
2286 def: 2330 def:
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index eb6e896bab..4ce5b00f63 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -119,6 +119,13 @@ eolian_object_namespaces_get(const Eolian_Object *obj)
119 return &it->itr; 119 return &it->itr;
120} 120}
121 121
122EAPI Eina_Bool
123eolian_object_is_beta(const Eolian_Object *obj)
124{
125 if (!obj) return EINA_FALSE;
126 return obj->is_beta;
127}
128
122void database_doc_del(Eolian_Documentation *doc) 129void database_doc_del(Eolian_Documentation *doc)
123{ 130{
124 if (!doc) return; 131 if (!doc) return;
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index b70f2b4f1e..058da20dd8 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -89,7 +89,8 @@ struct _Eolian_Object
89 int column; 89 int column;
90 int refcount; 90 int refcount;
91 Eolian_Object_Type type; 91 Eolian_Object_Type type;
92 Eina_Bool validated; 92 Eina_Bool validated: 1;
93 Eina_Bool is_beta: 1;
93}; 94};
94 95
95static inline void 96static inline void
@@ -196,7 +197,6 @@ struct _Eolian_Class
196 Eina_List *callables; /* internal for now */ 197 Eina_List *callables; /* internal for now */
197 Eina_Bool class_ctor_enable:1; 198 Eina_Bool class_ctor_enable:1;
198 Eina_Bool class_dtor_enable:1; 199 Eina_Bool class_dtor_enable:1;
199 Eina_Bool is_beta :1;
200}; 200};
201 201
202struct _Eolian_Function 202struct _Eolian_Function
@@ -232,7 +232,6 @@ struct _Eolian_Function
232 Eina_Bool get_only_legacy: 1; 232 Eina_Bool get_only_legacy: 1;
233 Eina_Bool set_only_legacy: 1; 233 Eina_Bool set_only_legacy: 1;
234 Eina_Bool is_class :1; 234 Eina_Bool is_class :1;
235 Eina_Bool is_beta :1;
236 Eina_List *ctor_of; 235 Eina_List *ctor_of;
237 Eolian_Class *klass; 236 Eolian_Class *klass;
238}; 237};
@@ -328,7 +327,6 @@ struct _Eolian_Event
328 Eolian_Type *type; 327 Eolian_Type *type;
329 Eolian_Class *klass; 328 Eolian_Class *klass;
330 Eolian_Object_Scope scope; 329 Eolian_Object_Scope scope;
331 Eina_Bool is_beta :1;
332 Eina_Bool is_hot :1; 330 Eina_Bool is_hot :1;
333 Eina_Bool is_restart :1; 331 Eina_Bool is_restart :1;
334}; 332};
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 0df6ee8884..a2a6b5c323 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -622,6 +622,10 @@ class Object(EolianBaseObject):
622 def column(self): 622 def column(self):
623 return int(lib.eolian_object_column_get(self)) 623 return int(lib.eolian_object_column_get(self))
624 624
625 @cached_property
626 def is_beta(self):
627 return bool(lib.eolian_object_is_beta(self))
628
625 629
626class Class(Object): 630class Class(Object):
627 def __repr__(self): 631 def __repr__(self):
@@ -811,10 +815,6 @@ class Event(Object):
811 return Eolian_Object_Scope(lib.eolian_event_scope_get(self)) 815 return Eolian_Object_Scope(lib.eolian_event_scope_get(self))
812 816
813 @cached_property 817 @cached_property
814 def is_beta(self):
815 return bool(lib.eolian_event_is_beta(self))
816
817 @cached_property
818 def is_hot(self): 818 def is_hot(self):
819 return bool(lib.eolian_event_is_hot(self)) 819 return bool(lib.eolian_event_is_hot(self))
820 820
@@ -887,10 +887,6 @@ class Function(Object):
887 return bool(lib.eolian_function_is_class(self)) 887 return bool(lib.eolian_function_is_class(self))
888 888
889 @cached_property 889 @cached_property
890 def is_beta(self):
891 return bool(lib.eolian_function_is_beta(self))
892
893 @cached_property
894 def object_is_const(self): 890 def object_is_const(self):
895 return bool(lib.eolian_function_object_is_const(self)) 891 return bool(lib.eolian_function_object_is_const(self))
896 892
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index 1f6a2f3d71..9389683123 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -228,6 +228,10 @@ lib.eolian_object_short_name_get.restype = c_char_p
228lib.eolian_object_namespaces_get.argtypes = (c_void_p,) 228lib.eolian_object_namespaces_get.argtypes = (c_void_p,)
229lib.eolian_object_namespaces_get.restype = c_void_p 229lib.eolian_object_namespaces_get.restype = c_void_p
230 230
231# EAPI Eina_Bool eolian_object_is_beta(const Eolian_Object *obj);
232lib.eolian_object_is_beta.argtypes = (c_void_p,)
233lib.eolian_object_is_beta.restype = c_bool
234
231### Eolian_Class ############################################################ 235### Eolian_Class ############################################################
232 236
233# EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); 237# EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
@@ -340,10 +344,6 @@ lib.eolian_function_is_legacy_only.restype = c_bool
340lib.eolian_function_is_class.argtypes = (c_void_p,) 344lib.eolian_function_is_class.argtypes = (c_void_p,)
341lib.eolian_function_is_class.restype = c_bool 345lib.eolian_function_is_class.restype = c_bool
342 346
343# EAPI Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id);
344lib.eolian_function_is_beta.argtypes = (c_void_p,)
345lib.eolian_function_is_beta.restype = c_bool
346
347# EAPI Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); 347# EAPI Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass);
348lib.eolian_function_is_constructor.argtypes = (c_void_p,c_void_p,) 348lib.eolian_function_is_constructor.argtypes = (c_void_p,c_void_p,)
349lib.eolian_function_is_constructor.restype = c_bool 349lib.eolian_function_is_constructor.restype = c_bool
@@ -485,10 +485,6 @@ lib.eolian_event_documentation_get.restype = c_void_p
485lib.eolian_event_scope_get.argtypes = (c_void_p,) 485lib.eolian_event_scope_get.argtypes = (c_void_p,)
486lib.eolian_event_scope_get.restype = c_int 486lib.eolian_event_scope_get.restype = c_int
487 487
488# EAPI Eina_Bool eolian_event_is_beta(const Eolian_Event *event);
489lib.eolian_event_is_beta.argtypes = (c_void_p,)
490lib.eolian_event_is_beta.restype = c_bool
491
492# EAPI Eina_Bool eolian_event_is_hot(const Eolian_Event *event); 488# EAPI Eina_Bool eolian_event_is_hot(const Eolian_Event *event);
493lib.eolian_event_is_hot.argtypes = (c_void_p,) 489lib.eolian_event_is_hot.argtypes = (c_void_p,)
494lib.eolian_event_is_hot.restype = c_bool 490lib.eolian_event_is_hot.restype = c_bool