forked from enlightenment/efl
Eolian: add API to return the class from a function.
@feature
This commit is contained in:
parent
13c3d3d7d6
commit
57a4cae33b
|
@ -1097,6 +1097,16 @@ EAPI Eina_Bool eolian_function_return_is_warn_unused(const Eolian_Function *foo_
|
|||
*/
|
||||
EAPI Eina_Bool eolian_function_object_is_const(const Eolian_Function *function_id);
|
||||
|
||||
/*
|
||||
* @brief Return the Eolian class associated to the function.
|
||||
*
|
||||
* @param[in] function_id id of the function
|
||||
* @return the class, NULL otherwise
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI const Eolian_Class *eolian_function_class_get(const Eolian_Function *function_id);
|
||||
|
||||
/*
|
||||
* @brief Get full string of an overriding function (implement).
|
||||
*
|
||||
|
|
|
@ -250,6 +250,13 @@ eolian_function_object_is_const(const Eolian_Function *fid)
|
|||
return fid->obj_is_const;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Class *
|
||||
eolian_function_class_get(const Eolian_Function *fid)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
|
||||
return fid->klass;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
eolian_function_is_c_only(const Eolian_Function *fid)
|
||||
{
|
||||
|
|
|
@ -558,6 +558,7 @@ START_TEST(eolian_simple_parsing)
|
|||
fail_if(strcmp(string, "comment a.set"));
|
||||
string = eolian_function_description_get(fid, EOLIAN_PROP_GET);
|
||||
fail_if(string);
|
||||
fail_if(eolian_function_class_get(fid) != class);
|
||||
/* Set return */
|
||||
tp = eolian_function_return_type_get(fid, EOLIAN_PROP_SET);
|
||||
fail_if(!tp);
|
||||
|
|
Loading…
Reference in New Issue