forked from enlightenment/efl
eolian: get rid of eolian_parameter_information_get
This commit is contained in:
parent
ad3dbe834b
commit
93726c86a3
|
@ -106,7 +106,7 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
|
|||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &rettypet, NULL, NULL);
|
||||
rettypet = eolian_parameter_type_get((Eolian_Function_Parameter*)data);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
|
@ -154,13 +154,11 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
|
|||
itr = eolian_property_keys_get(func);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
const char *pdesc = NULL;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &ptypet, &pname, &pdesc);
|
||||
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
const char *pdesc = eolian_parameter_description_get(param);
|
||||
|
||||
eina_strbuf_append_printf(str_pardesc, tmpl_eo_pardesc, "in", pname, pdesc?pdesc:"No description supplied.");
|
||||
|
||||
|
@ -175,15 +173,13 @@ eo_fundef_generate(const Eolian_Class *class, Eolian_Function *func, Eolian_Func
|
|||
itr = eolian_function_parameters_get(func);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
const char *pdesc;
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
const char *pdesc = eolian_parameter_description_get(param);
|
||||
Eina_Bool add_star = EINA_FALSE;
|
||||
Eolian_Parameter_Dir pdir;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, &pdir, &ptypet, &pname, &pdesc);
|
||||
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
|
||||
if (ftype == EOLIAN_PROP_GET) {
|
||||
|
@ -342,7 +338,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
Eina_Bool var_as_ret = EINA_FALSE;
|
||||
const Eolian_Type *rettypet = NULL;
|
||||
const char *rettype = NULL;
|
||||
const char *retname = NULL;
|
||||
Eina_Bool ret_const = EINA_FALSE;
|
||||
Eina_Bool add_star = EINA_FALSE;
|
||||
Eina_Iterator *itr;
|
||||
|
@ -357,7 +352,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
Eina_Strbuf *full_params = eina_strbuf_new(); /* variables types + names */
|
||||
|
||||
rettypet = eolian_function_return_type_get(funcid, ftype);
|
||||
retname = "ret";
|
||||
if (ftype == EOLIAN_PROP_GET)
|
||||
{
|
||||
suffix = "_get";
|
||||
|
@ -368,7 +362,8 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &rettypet, &retname, NULL);
|
||||
Eolian_Function_Parameter *param = data;
|
||||
rettypet = eolian_parameter_type_get(param);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
|
@ -383,13 +378,10 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
itr = eolian_property_keys_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &ptypet, &pname, NULL);
|
||||
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
|
||||
if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", ");
|
||||
eina_strbuf_append_printf(params, "%s", pname);
|
||||
|
@ -404,14 +396,11 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
|
|||
itr = eolian_function_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
Eolian_Parameter_Dir pdir;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, &pdir, &ptypet, &pname, NULL);
|
||||
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
|
|
|
@ -17,11 +17,9 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
itr = eolian_property_keys_get(foo);
|
||||
EINA_ITERATOR_FOREACH(itr, param)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
eolian_parameter_information_get(param, NULL, &ptypet, &pname, NULL);
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(param, ftype == EOLIAN_PROP_GET);
|
||||
if (eina_strbuf_length_get(params))
|
||||
|
@ -43,12 +41,10 @@ _params_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina_Bo
|
|||
itr = eolian_function_parameters_get(foo);
|
||||
EINA_ITERATOR_FOREACH(itr, param)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
Eolian_Parameter_Dir pdir;
|
||||
eolian_parameter_information_get(param, &pdir, &ptypet, &pname, NULL);
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
Eina_Bool is_const = eolian_parameter_const_attribute_get(param, ftype == EOLIAN_PROP_GET);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
|
@ -153,7 +149,7 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
|
|||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
Eolian_Function_Parameter *param = data;
|
||||
eolian_parameter_information_get(param, NULL, &rettypet, NULL, NULL);
|
||||
rettypet = eolian_parameter_type_get(param);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(param, EINA_TRUE);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &rettypet, NULL, NULL);
|
||||
rettypet = eolian_parameter_type_get((Eolian_Function_Parameter*)data);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
|
@ -112,12 +112,11 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
itr = eolian_property_keys_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *pdesc;
|
||||
const char *ptype;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &ptypet, &pname, &pdesc);
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
const char *pdesc = eolian_parameter_description_get(param);
|
||||
leg_param_idx++;
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s%s %s",
|
||||
|
@ -142,14 +141,13 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
itr = eolian_function_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *pdesc;
|
||||
const char *ptype;
|
||||
Eolian_Parameter_Dir pdir;
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
const char *pdesc = eolian_parameter_description_get(param);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
const char *str_dir[] = {"in", "out", "inout"};
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, &pdir, &ptypet, &pname, &pdesc);
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
if (ftype == EOLIAN_PROP_GET) pdir = EOLIAN_OUT_PARAM;
|
||||
|
@ -242,7 +240,9 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
/* We want to check if there is only one parameter */
|
||||
if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
|
||||
{
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &rettypet, &retname, NULL);
|
||||
Eolian_Function_Parameter *param = data;
|
||||
rettypet = eolian_parameter_type_get(param);
|
||||
retname = eolian_parameter_name_get(param);
|
||||
var_as_ret = EINA_TRUE;
|
||||
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
|
||||
}
|
||||
|
@ -283,11 +283,10 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
itr = eolian_property_keys_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, NULL, &ptypet, &pname, NULL);
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s%s %s",
|
||||
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
|
||||
|
@ -299,15 +298,14 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
eina_iterator_free(itr);
|
||||
if (!var_as_ret)
|
||||
{
|
||||
itr = eolian_function_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
const Eolian_Type *ptypet;
|
||||
const char *pname;
|
||||
const char *ptype;
|
||||
Eolian_Parameter_Dir pdir;
|
||||
eolian_parameter_information_get((Eolian_Function_Parameter*)data, &pdir, &ptypet, &pname, NULL);
|
||||
ptype = eolian_type_c_type_get(ptypet);
|
||||
itr = eolian_function_parameters_get(funcid);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
{
|
||||
Eolian_Function_Parameter *param = data;
|
||||
const Eolian_Type *ptypet = eolian_parameter_type_get(param);
|
||||
const char *pname = eolian_parameter_name_get(param);
|
||||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param);
|
||||
Eina_Bool had_star = !!strchr(ptype, '*');
|
||||
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM);
|
||||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
|
@ -317,8 +315,8 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
|
|||
eina_stringshare_del(ptype);
|
||||
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
|
||||
eina_strbuf_append_printf(eoparam, "%s", pname);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
eina_iterator_free(itr);
|
||||
}
|
||||
if (!eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, "void");
|
||||
|
||||
|
|
|
@ -7,11 +7,8 @@ namespace eolian_cxx {
|
|||
static std::string
|
||||
_comment_parameter(Eolian_Function_Parameter *param)
|
||||
{
|
||||
Eolian_Parameter_Dir direction;
|
||||
Eina_Stringshare *description;
|
||||
|
||||
::eolian_parameter_information_get
|
||||
(param, &direction, NULL, NULL, &description);
|
||||
Eolian_Parameter_Dir direction = eolian_parameter_direction_get(param);
|
||||
Eina_Stringshare *description = eolian_parameter_description_get(param);
|
||||
|
||||
std::string doc = "@param";
|
||||
if (direction == EOLIAN_IN_PARAM) doc += " ";
|
||||
|
|
|
@ -276,8 +276,7 @@ parameter_name(Eolian_Function_Parameter const& parameter)
|
|||
inline bool
|
||||
parameter_is_out(Eolian_Function_Parameter const& parameter)
|
||||
{
|
||||
Eolian_Parameter_Dir direction;
|
||||
::eolian_parameter_information_get(¶meter, &direction, NULL, NULL, NULL);
|
||||
Eolian_Parameter_Dir direction = eolian_parameter_direction_get(¶meter);
|
||||
return direction == EOLIAN_OUT_PARAM || direction == EOLIAN_INOUT_PARAM;
|
||||
}
|
||||
|
||||
|
|
|
@ -705,17 +705,14 @@ EAPI Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id);
|
|||
EAPI Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id);
|
||||
|
||||
/*
|
||||
* @brief Get information about a function parameter
|
||||
* @brief Get direction of a parameter
|
||||
*
|
||||
* @param[in] param_desc parameter handle
|
||||
* @param[out] param_dir in/out/inout
|
||||
* @param[out] type type of the parameter
|
||||
* @param[out] name name of the parameter
|
||||
* @param[out] description description of the parameter
|
||||
* @return the direction of the parameter
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI void eolian_parameter_information_get(const Eolian_Function_Parameter *param_desc, Eolian_Parameter_Dir *param_dir, const Eolian_Type **type, const char **name, const char **description);
|
||||
EAPI Eolian_Parameter_Dir eolian_parameter_direction_get(const Eolian_Function_Parameter *param);
|
||||
|
||||
/*
|
||||
* @brief Get type of a parameter
|
||||
|
@ -737,6 +734,16 @@ EAPI const Eolian_Type *eolian_parameter_type_get(const Eolian_Function_Paramete
|
|||
*/
|
||||
EAPI Eina_Stringshare *eolian_parameter_name_get(const Eolian_Function_Parameter *param);
|
||||
|
||||
/*
|
||||
* @brief Get description of a parameter
|
||||
*
|
||||
* @param[in] param_desc parameter handle
|
||||
* @return the description of the parameter or NULL
|
||||
*
|
||||
* @ingroup Eolian
|
||||
*/
|
||||
EAPI Eina_Stringshare *eolian_parameter_description_get(const Eolian_Function_Parameter *param);
|
||||
|
||||
/*
|
||||
* @brief Indicates if a parameter has a const attribute.
|
||||
*
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
#include <Eina.h>
|
||||
#include "eolian_database.h"
|
||||
|
||||
EAPI Eolian_Parameter_Dir
|
||||
eolian_parameter_direction_get(const Eolian_Function_Parameter *param)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(param, EOLIAN_IN_PARAM);
|
||||
return param->param_dir;
|
||||
}
|
||||
|
||||
EAPI const Eolian_Type *
|
||||
eolian_parameter_type_get(const Eolian_Function_Parameter *param)
|
||||
{
|
||||
|
@ -16,14 +23,11 @@ eolian_parameter_name_get(const Eolian_Function_Parameter *param)
|
|||
return param->name;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
eolian_parameter_information_get(const Eolian_Function_Parameter *param, Eolian_Parameter_Dir *param_dir, const Eolian_Type **type, const char **name, const char **description)
|
||||
EAPI Eina_Stringshare *
|
||||
eolian_parameter_description_get(const Eolian_Function_Parameter *param)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(param);
|
||||
if (param_dir) *param_dir = param->param_dir;
|
||||
if (type) *type = param->type;
|
||||
if (name) *name = param->name;
|
||||
if (description) *description = param->description;
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(param, NULL);
|
||||
return param->description;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
|
|
@ -437,9 +437,7 @@ END_TEST
|
|||
START_TEST(eolian_simple_parsing)
|
||||
{
|
||||
const Eolian_Function *fid = NULL;
|
||||
const Eolian_Type *ptypep = NULL;
|
||||
const char *string = NULL, *ptype = NULL, *pname = NULL;
|
||||
Eolian_Parameter_Dir dir = EOLIAN_IN_PARAM;
|
||||
const char *string = NULL, *ptype = NULL;
|
||||
const Eolian_Function_Parameter *param = NULL;
|
||||
const Eolian_Expression *expr = NULL;
|
||||
const Eolian_Class *class;
|
||||
|
@ -494,10 +492,9 @@ START_TEST(eolian_simple_parsing)
|
|||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
eolian_parameter_information_get(param, NULL, &ptypep, &pname, &string);
|
||||
fail_if(strcmp(eolian_type_name_get(ptypep), "int"));
|
||||
fail_if(strcmp(pname, "value"));
|
||||
fail_if(strcmp(string, "Value description"));
|
||||
fail_if(strcmp(eolian_type_name_get(eolian_parameter_type_get(param)), "int"));
|
||||
fail_if(strcmp(eolian_parameter_name_get(param), "value"));
|
||||
fail_if(strcmp(eolian_parameter_description_get(param), "Value description"));
|
||||
|
||||
/* Method */
|
||||
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
|
||||
|
@ -521,25 +518,22 @@ START_TEST(eolian_simple_parsing)
|
|||
/* Function parameters */
|
||||
fail_if(!(iter = eolian_property_values_get(fid)));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
|
||||
fail_if(dir != EOLIAN_IN_PARAM);
|
||||
fail_if(strcmp(eolian_type_name_get(ptypep), "int"));
|
||||
fail_if(strcmp(pname, "a"));
|
||||
fail_if(!string || strcmp(string, "a"));
|
||||
fail_if(eolian_parameter_direction_get(param) != EOLIAN_IN_PARAM);
|
||||
fail_if(strcmp(eolian_type_name_get(eolian_parameter_type_get(param)), "int"));
|
||||
fail_if(strcmp(eolian_parameter_name_get(param), "a"));
|
||||
fail_if(strcmp(eolian_parameter_description_get(param), "a"));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
|
||||
fail_if(dir != EOLIAN_INOUT_PARAM);
|
||||
ptype = eolian_type_name_get(ptypep);
|
||||
fail_if(eolian_parameter_direction_get(param) != EOLIAN_INOUT_PARAM);
|
||||
ptype = eolian_type_name_get(eolian_parameter_type_get(param));
|
||||
fail_if(strcmp(ptype, "char"));
|
||||
eina_stringshare_del(ptype);
|
||||
fail_if(strcmp(pname, "b"));
|
||||
fail_if(string);
|
||||
fail_if(strcmp(eolian_parameter_name_get(param), "b"));
|
||||
fail_if(eolian_parameter_description_get(param));
|
||||
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
|
||||
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
|
||||
fail_if(dir != EOLIAN_OUT_PARAM);
|
||||
fail_if(strcmp(eolian_type_name_get(ptypep), "double"));
|
||||
fail_if(strcmp(pname, "c"));
|
||||
fail_if(string);
|
||||
fail_if(eolian_parameter_direction_get(param) != EOLIAN_OUT_PARAM);
|
||||
fail_if(strcmp(eolian_type_name_get(eolian_parameter_type_get(param)), "double"));
|
||||
fail_if(strcmp(eolian_parameter_name_get(param), "c"));
|
||||
fail_if(eolian_parameter_description_get(param));
|
||||
fail_if(eina_iterator_next(iter, &dummy));
|
||||
eina_iterator_free(iter);
|
||||
|
||||
|
|
Loading…
Reference in New Issue