summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/eolian/headers.c8
-rw-r--r--src/lib/eolian/Eolian.h10
-rw-r--r--src/lib/eolian/database_class_api.c7
-rw-r--r--src/lib/eolian/eo_parser.c5
-rw-r--r--src/lib/eolian/eolian_database.h1
5 files changed, 31 insertions, 0 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 472043b..7fbd576 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -192,6 +192,10 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
192 192
193 /* class definition */ 193 /* class definition */
194 194
195 if (!legacy && eolian_class_is_beta(cl))
196 {
197 eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
198 }
195 if (!legacy) 199 if (!legacy)
196 { 200 {
197 const Eolian_Documentation *doc = eolian_class_documentation_get(cl); 201 const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
@@ -298,6 +302,10 @@ events:
298 } 302 }
299 eina_iterator_free(itr); 303 eina_iterator_free(itr);
300 } 304 }
305 if (!legacy && eolian_class_is_beta(cl))
306 {
307 eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
308 }
301 309
302 free(cname); 310 free(cname);
303 free(cnameu); 311 free(cnameu);
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index fc28058..0320da2 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2299,6 +2299,16 @@ EAPI Eina_Stringshare *eolian_class_c_name_get(const Eolian_Class *klass);
2299EAPI Eina_Stringshare *eolian_class_c_data_type_get(const Eolian_Class *klass); 2299EAPI Eina_Stringshare *eolian_class_c_data_type_get(const Eolian_Class *klass);
2300 2300
2301/* 2301/*
2302 * @brief Get whether a class is beta.
2303 *
2304 * @param[in] klass the class
2305 * @return EINA_TRUE if the class has been marked as BETA
2306 *
2307 * @ingroup Eolian
2308 */
2309EAPI Eina_Bool eolian_class_is_beta(const Eolian_Class *klass);
2310
2311/*
2302 * @brief Get the type of a type declaration. 2312 * @brief Get the type of a type declaration.
2303 * 2313 *
2304 * @param[in] tp the type declaration. 2314 * @param[in] tp the type declaration.
diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c
index f79cdb8..73d0136 100644
--- a/src/lib/eolian/database_class_api.c
+++ b/src/lib/eolian/database_class_api.c
@@ -228,3 +228,10 @@ 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/eo_parser.c b/src/lib/eolian/eo_parser.c
index fe5d153..4346b34 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2093,6 +2093,11 @@ parse_class(Eo_Lexer *ls, Eolian_Class_Type type)
2093 eo_lexer_get(ls); 2093 eo_lexer_get(ls);
2094 ls->klass->type = type; 2094 ls->klass->type = type;
2095 eo_lexer_context_push(ls); 2095 eo_lexer_context_push(ls);
2096 if (ls->t.kw == KW_at_beta)
2097 {
2098 ls->klass->is_beta = EINA_TRUE;
2099 eo_lexer_get(ls);
2100 }
2096 parse_name(ls, buf); 2101 parse_name(ls, buf);
2097 bnm = eina_stringshare_ref(ls->filename); 2102 bnm = eina_stringshare_ref(ls->filename);
2098 fnm = database_class_to_filename(eina_strbuf_string_get(buf)); 2103 fnm = database_class_to_filename(eina_strbuf_string_get(buf));
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index d0d7873..b70f2b4 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -196,6 +196,7 @@ struct _Eolian_Class
196 Eina_List *callables; /* internal for now */ 196 Eina_List *callables; /* internal for now */
197 Eina_Bool class_ctor_enable:1; 197 Eina_Bool class_ctor_enable:1;
198 Eina_Bool class_dtor_enable:1; 198 Eina_Bool class_dtor_enable:1;
199 Eina_Bool is_beta :1;
199}; 200};
200 201
201struct _Eolian_Function 202struct _Eolian_Function