forked from enlightenment/efl
eolian: more old type api removals
This commit is contained in:
parent
4e40b60f06
commit
863212f84a
|
@ -277,20 +277,15 @@ ffi.cdef [[
|
|||
Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp);
|
||||
Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp);
|
||||
const Eolian_Struct_Type_Field *eolian_typedecl_struct_field_get(const Eolian_Typedecl *tp, const char *field);
|
||||
|
||||
/* TODO */
|
||||
const char *eolian_type_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
|
||||
const Eolian_Documentation *eolian_type_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
|
||||
const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
|
||||
|
||||
const char *eolian_typedecl_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
|
||||
const Eolian_Documentation *eolian_typedecl_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
|
||||
const Eolian_Type *eolian_typedecl_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
|
||||
Eina_Iterator *eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp);
|
||||
const Eolian_Enum_Type_Field *eolian_typedecl_enum_field_get(const Eolian_Typedecl *tp, const char *field);
|
||||
|
||||
/* TODO */
|
||||
const char *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
const char *eolian_type_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
const Eolian_Documentation *eolian_type_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
|
||||
const Eolian_Expression *eolian_type_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force);
|
||||
const char *eolian_typedecl_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
const char *eolian_typedecl_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
const Eolian_Documentation *eolian_typedecl_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
|
||||
const Eolian_Expression *eolian_typedecl_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force);
|
||||
|
||||
const char *eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl *tp);
|
||||
const Eolian_Documentation *eolian_typedecl_documentation_get(const Eolian_Typedecl *tp);
|
||||
|
@ -474,52 +469,50 @@ M.typedecl_type = {
|
|||
ALIAS = 4
|
||||
}
|
||||
|
||||
-- TODO change func sigs
|
||||
ffi.metatype("Eolian_Struct_Type_Field", {
|
||||
__index = {
|
||||
name_get = function(self)
|
||||
local v = eolian.eolian_type_struct_field_name_get(self)
|
||||
local v = eolian.eolian_typedecl_struct_field_name_get(self)
|
||||
if v == nil then return nil end
|
||||
return ffi.string(v)
|
||||
end,
|
||||
|
||||
documentation_get = function(self)
|
||||
local v = eolian.eolian_type_struct_field_documentation_get(self)
|
||||
local v = eolian.eolian_typedecl_struct_field_documentation_get(self)
|
||||
if v == nil then return nil end
|
||||
return v
|
||||
end,
|
||||
|
||||
type_get = function(self)
|
||||
local v = eolian.eolian_type_struct_field_type_get(self)
|
||||
local v = eolian.eolian_typedecl_struct_field_type_get(self)
|
||||
if v == nil then return nil end
|
||||
return v
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
-- TODO change func sigs
|
||||
ffi.metatype("Eolian_Enum_Type_Field", {
|
||||
__index = {
|
||||
name_get = function(self)
|
||||
local v = eolian.eolian_type_enum_field_name_get(self)
|
||||
local v = eolian.eolian_typedecl_enum_field_name_get(self)
|
||||
if v == nil then return nil end
|
||||
return ffi.string(v)
|
||||
end,
|
||||
|
||||
c_name_get = function(self)
|
||||
local v = eolian.eolian_type_enum_field_c_name_get(self)
|
||||
local v = eolian.eolian_typedecl_enum_field_c_name_get(self)
|
||||
if v == nil then return nil end
|
||||
return ffi_stringshare(v)
|
||||
end,
|
||||
|
||||
documentation_get = function(self)
|
||||
local v = eolian.eolian_type_enum_field_documentation_get(self)
|
||||
local v = eolian.eolian_typedecl_enum_field_documentation_get(self)
|
||||
if v == nil then return nil end
|
||||
return v
|
||||
end,
|
||||
|
||||
value_get = function(self, force)
|
||||
local v = eolian.eolian_type_enum_field_value_get(self, force and 1 or 0)
|
||||
local v = eolian.eolian_typedecl_enum_field_value_get(self, force and 1 or 0)
|
||||
if v == nil then return nil end
|
||||
return v
|
||||
end
|
||||
|
|
|
@ -1362,7 +1362,6 @@ EAPI Eina_Iterator *eolian_type_subtypes_get(const Eolian_Type *tp);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_struct_fields_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
|
@ -1375,7 +1374,6 @@ EAPI Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp)
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Struct_Type_Field *eolian_type_struct_field_get(const Eolian_Type *tp, const char *field);
|
||||
EAPI const Eolian_Struct_Type_Field *eolian_typedecl_struct_field_get(const Eolian_Typedecl *tp, const char *field);
|
||||
|
||||
/*
|
||||
|
@ -1386,8 +1384,7 @@ EAPI const Eolian_Struct_Type_Field *eolian_typedecl_struct_field_get(const Eoli
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
|
||||
#define eolian_typedecl_struct_field_name_get eolian_type_struct_field_name_get
|
||||
EAPI Eina_Stringshare *eolian_typedecl_struct_field_name_get(const Eolian_Struct_Type_Field *fl);
|
||||
|
||||
/*
|
||||
* @brief Get the documentation of a field of a struct type.
|
||||
|
@ -1397,8 +1394,7 @@ EAPI Eina_Stringshare *eolian_type_struct_field_name_get(const Eolian_Struct_Typ
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Documentation *eolian_type_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
|
||||
#define eolian_typedecl_struct_field_documentation_get eolian_type_struct_field_documentation_get
|
||||
EAPI const Eolian_Documentation *eolian_typedecl_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl);
|
||||
|
||||
/*
|
||||
* @brief Get the type of a field of a struct type.
|
||||
|
@ -1408,8 +1404,7 @@ EAPI const Eolian_Documentation *eolian_type_struct_field_documentation_get(cons
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
|
||||
#define eolian_typedecl_struct_field_type_get eolian_type_struct_field_type_get
|
||||
EAPI const Eolian_Type *eolian_typedecl_struct_field_type_get(const Eolian_Struct_Type_Field *fl);
|
||||
|
||||
/*
|
||||
* @brief Get an iterator to all fields of an enum type.
|
||||
|
@ -1419,7 +1414,6 @@ EAPI const Eolian_Type *eolian_type_struct_field_type_get(const Eolian_Struct_Ty
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Iterator *eolian_type_enum_fields_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Iterator *eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
|
@ -1435,7 +1429,6 @@ EAPI Eina_Iterator *eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp);
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Enum_Type_Field *eolian_type_enum_field_get(const Eolian_Type *tp, const char *field);
|
||||
EAPI const Eolian_Enum_Type_Field *eolian_typedecl_enum_field_get(const Eolian_Typedecl *tp, const char *field);
|
||||
|
||||
/*
|
||||
|
@ -1446,8 +1439,7 @@ EAPI const Eolian_Enum_Type_Field *eolian_typedecl_enum_field_get(const Eolian_T
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
#define eolian_typedecl_enum_field_name_get eolian_type_enum_field_name_get
|
||||
EAPI Eina_Stringshare *eolian_typedecl_enum_field_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
|
||||
/*
|
||||
* @brief Get the C name of a field of an enum type.
|
||||
|
@ -1459,8 +1451,7 @@ EAPI Eina_Stringshare *eolian_type_enum_field_name_get(const Eolian_Enum_Type_Fi
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
#define eolian_typedecl_enum_field_c_name_get eolian_type_enum_field_c_name_get
|
||||
EAPI Eina_Stringshare *eolian_typedecl_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl);
|
||||
|
||||
/*
|
||||
* @brief Get the documentation of a field of an enum type.
|
||||
|
@ -1470,8 +1461,7 @@ EAPI Eina_Stringshare *eolian_type_enum_field_c_name_get(const Eolian_Enum_Type_
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Documentation *eolian_type_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
|
||||
#define eolian_typedecl_enum_field_documentation_get eolian_type_enum_field_documentation_get
|
||||
EAPI const Eolian_Documentation *eolian_typedecl_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
|
||||
|
||||
/*
|
||||
* @brief Get the value of a field of an enum type.
|
||||
|
@ -1486,8 +1476,7 @@ EAPI const Eolian_Documentation *eolian_type_enum_field_documentation_get(const
|
|||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Expression *eolian_type_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force);
|
||||
#define eolian_typedecl_enum_field_value_get eolian_type_enum_field_value_get
|
||||
EAPI const Eolian_Expression *eolian_typedecl_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force);
|
||||
|
||||
/*
|
||||
* @brief Get the legacy prefix of enum field names. When not specified,
|
||||
|
|
|
@ -527,7 +527,7 @@ eval_exp(const Eolian_Expression *expr, Eolian_Expression_Mask mask,
|
|||
}
|
||||
|
||||
fl = eolian_typedecl_enum_field_get(etpd, memb);
|
||||
if (fl) exp = eolian_type_enum_field_value_get(fl, EINA_TRUE);
|
||||
if (fl) exp = eolian_typedecl_enum_field_value_get(fl, EINA_TRUE);
|
||||
free(fulln);
|
||||
|
||||
if (!exp)
|
||||
|
|
|
@ -97,15 +97,6 @@ eolian_type_subtypes_get(const Eolian_Type *tp)
|
|||
return eina_list_iterator_new(tp->subtypes);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_struct_fields_get(const Eolian_Type *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
if (tp->type != EOLIAN_TYPE_STRUCT)
|
||||
return NULL;
|
||||
return eina_list_iterator_new(tp->field_list);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
|
@ -115,19 +106,6 @@ eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp)
|
|||
return eina_list_iterator_new(tp->field_list);
|
||||
}
|
||||
|
||||
EAPI const Eolian_Struct_Type_Field *
|
||||
eolian_type_struct_field_get(const Eolian_Type *tp, const char *field)
|
||||
{
|
||||
Eolian_Struct_Type_Field *sf = NULL;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(field, NULL);
|
||||
if (tp->type != EOLIAN_TYPE_STRUCT)
|
||||
return NULL;
|
||||
sf = eina_hash_find(tp->fields, field);
|
||||
if (!sf) return NULL;
|
||||
return sf;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Struct_Type_Field *
|
||||
eolian_typedecl_struct_field_get(const Eolian_Typedecl *tp, const char *field)
|
||||
{
|
||||
|
@ -142,35 +120,26 @@ eolian_typedecl_struct_field_get(const Eolian_Typedecl *tp, const char *field)
|
|||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_struct_field_name_get(const Eolian_Struct_Type_Field *fl)
|
||||
eolian_typedecl_struct_field_name_get(const Eolian_Struct_Type_Field *fl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fl, NULL);
|
||||
return fl->name;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Documentation *
|
||||
eolian_type_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl)
|
||||
eolian_typedecl_struct_field_documentation_get(const Eolian_Struct_Type_Field *fl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fl, NULL);
|
||||
return fl->doc;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Type *
|
||||
eolian_type_struct_field_type_get(const Eolian_Struct_Type_Field *fl)
|
||||
eolian_typedecl_struct_field_type_get(const Eolian_Struct_Type_Field *fl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fl, NULL);
|
||||
return fl->type;
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_type_enum_fields_get(const Eolian_Type *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
if (tp->type != EOLIAN_TYPE_ENUM)
|
||||
return NULL;
|
||||
return eina_list_iterator_new(tp->field_list);
|
||||
}
|
||||
|
||||
EAPI Eina_Iterator *
|
||||
eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
|
@ -180,19 +149,6 @@ eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp)
|
|||
return eina_list_iterator_new(tp->field_list);
|
||||
}
|
||||
|
||||
EAPI const Eolian_Enum_Type_Field *
|
||||
eolian_type_enum_field_get(const Eolian_Type *tp, const char *field)
|
||||
{
|
||||
Eolian_Enum_Type_Field *ef = NULL;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(field, NULL);
|
||||
if (tp->type != EOLIAN_TYPE_ENUM)
|
||||
return NULL;
|
||||
ef = eina_hash_find(tp->fields, field);
|
||||
if (!ef) return NULL;
|
||||
return ef;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Enum_Type_Field *
|
||||
eolian_typedecl_enum_field_get(const Eolian_Typedecl *tp, const char *field)
|
||||
{
|
||||
|
@ -207,14 +163,14 @@ eolian_typedecl_enum_field_get(const Eolian_Typedecl *tp, const char *field)
|
|||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_enum_field_name_get(const Eolian_Enum_Type_Field *fl)
|
||||
eolian_typedecl_enum_field_name_get(const Eolian_Enum_Type_Field *fl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fl, NULL);
|
||||
return fl->name;
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_type_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl)
|
||||
eolian_typedecl_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl)
|
||||
{
|
||||
Eina_Stringshare *ret;
|
||||
Eina_Strbuf *buf;
|
||||
|
@ -237,14 +193,14 @@ eolian_type_enum_field_c_name_get(const Eolian_Enum_Type_Field *fl)
|
|||
}
|
||||
|
||||
EAPI const Eolian_Documentation *
|
||||
eolian_type_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl)
|
||||
eolian_typedecl_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fl, NULL);
|
||||
return fl->doc;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Expression *
|
||||
eolian_type_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force)
|
||||
eolian_typedecl_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool force)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fl, NULL);
|
||||
if (!force && !fl->is_public_value) return NULL;
|
||||
|
|
Loading…
Reference in New Issue