eolian: properly handle non-beta restriction of __undefined_type

This commit is contained in:
Daniel Kolesa 2019-08-31 14:02:20 +02:00
parent 3e22ac3e1c
commit fdc85f895d
4 changed files with 18 additions and 17 deletions

View File

@ -1,5 +1,5 @@
type @extern Ecore.Audio.Vio: __undefined_type; [[Ecore audio vio type]] /* FIXME: Had function pointer members. */
type @extern efl_key_data_free_func: __undefined_type; [[Efl key data free function type]] /* FIXME: Function pointers not allowed. */
type @extern @beta Ecore.Audio.Vio: __undefined_type; [[Ecore audio vio type]] /* FIXME: Had function pointer members. */
type @extern @beta efl_key_data_free_func: __undefined_type; [[Efl key data free function type]] /* FIXME: Function pointers not allowed. */
enum @beta Ecore.Audio.Format {
[[Ecore audio format type]]

View File

@ -19,7 +19,7 @@ struct @beta Efl.Ui.Text_Change_Info {
merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]]
}
type @extern Efl.Text_Annotate_Annotation: __undefined_type; [[EFL text annotations data structure]]
type @extern @beta Efl.Text_Annotate_Annotation: __undefined_type; [[EFL text annotations data structure]]
type @extern Efl.Text_Cursor_Cursor: __undefined_type; [[Text cursor data structure]]
type @extern @beta Efl.Text_Cursor_Cursor: __undefined_type; [[Text cursor data structure]]

View File

@ -1,6 +1,6 @@
type Elm_Interface_Scrollable_Cb: __undefined_type; [[Elementary interface scrollable callback type]]
type Elm_Interface_Scrollable_Resize_Cb: __undefined_type; [[Elementary interface scrollable resize callback type]]
type Elm_Interface_Scrollable_Min_Limit_Cb: __undefined_type; [[Elementary interface scrollable minimal limit callback type]]
type @beta Elm_Interface_Scrollable_Cb: __undefined_type; [[Elementary interface scrollable callback type]]
type @beta Elm_Interface_Scrollable_Resize_Cb: __undefined_type; [[Elementary interface scrollable resize callback type]]
type @beta Elm_Interface_Scrollable_Min_Limit_Cb: __undefined_type; [[Elementary interface scrollable minimal limit callback type]]
/* FIXME: Rename the namespace of the types. */
enum Elm.Scroller.Policy

View File

@ -269,7 +269,14 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
switch (tp->type)
{
case EOLIAN_TYPE_VOID:
return _validate(&tp->base);
case EOLIAN_TYPE_UNDEFINED:
if (vals->stable)
{
_eo_parser_log(&tp->base,
"__undefined_type not allowed in stable context");
return EINA_FALSE;
}
return _validate(&tp->base);
case EOLIAN_TYPE_REGULAR:
{
@ -314,17 +321,11 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
default:
break;
}
switch (id)
if (id == KW_void_ptr && vals->stable)
{
case KW_void_ptr:
case KW___undefined_type:
if (vals->stable)
{
_eo_parser_log(&tp->base,
"deprecated builtin type '%s' not allowed in stable context",
tp->base.name);
return EINA_FALSE;
}
_eo_parser_log(&tp->base,
"void pointers not allowed in stable context");
return EINA_FALSE;
}
return _validate(&tp->base);
}