forked from enlightenment/efl
eolian: add api to deal with typedecl free funcs
This commit is contained in:
parent
c0287a2752
commit
8514c1846f
|
@ -1698,6 +1698,7 @@ EAPI Eina_Iterator *eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp);
|
|||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_type_free_func_get(const Eolian_Type *tp);
|
||||
EAPI Eina_Stringshare *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
|
||||
|
||||
/*
|
||||
* @brief Evaluate an Eolian expression.
|
||||
|
|
|
@ -43,6 +43,7 @@ database_typedecl_del(Eolian_Typedecl *tp)
|
|||
if (tp->namespaces) EINA_LIST_FREE(tp->namespaces, sp)
|
||||
eina_stringshare_del(sp);
|
||||
if (tp->legacy) eina_stringshare_del(tp->legacy);
|
||||
if (tp->freefunc) eina_stringshare_del(tp->freefunc);
|
||||
/*database_doc_del(tp->doc);*/
|
||||
free(tp);
|
||||
}
|
||||
|
@ -83,6 +84,7 @@ _typedecl_add(Eolian_Type *type)
|
|||
ret->field_list = type->field_list;
|
||||
ret->doc = type->doc;
|
||||
ret->legacy = eina_stringshare_ref(type->legacy);
|
||||
ret->freefunc = eina_stringshare_ref(type->freefunc);
|
||||
ret->is_extern = type->is_extern;
|
||||
ret->parent = type;
|
||||
|
||||
|
|
|
@ -534,3 +534,10 @@ eolian_type_free_func_get(const Eolian_Type *tp)
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
return tp->freefunc;
|
||||
}
|
||||
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_typedecl_free_func_get(const Eolian_Typedecl *tp)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
|
||||
return tp->freefunc;
|
||||
}
|
||||
|
|
|
@ -197,6 +197,7 @@ struct _Eolian_Typedecl
|
|||
Eina_List *field_list;
|
||||
Eolian_Documentation *doc;
|
||||
Eina_Stringshare *legacy;
|
||||
Eina_Stringshare *freefunc;
|
||||
Eina_Bool is_extern :1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue