forked from enlightenment/efl
eolian: add support for function pointers in utility APIs
This commit is contained in:
parent
d9551af6e1
commit
99754341e7
|
@ -192,7 +192,8 @@ eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type
|
||||||
switch (ftype)
|
switch (ftype)
|
||||||
{
|
{
|
||||||
case EOLIAN_METHOD:
|
case EOLIAN_METHOD:
|
||||||
if (fid->type != EOLIAN_METHOD)
|
case EOLIAN_FUNCTION_POINTER:
|
||||||
|
if (fid->type != ftype)
|
||||||
return NULL;
|
return NULL;
|
||||||
return fid->get_ret_type;
|
return fid->get_ret_type;
|
||||||
case EOLIAN_PROP_GET:
|
case EOLIAN_PROP_GET:
|
||||||
|
@ -203,8 +204,6 @@ eolian_function_return_type_get(const Eolian_Function *fid, Eolian_Function_Type
|
||||||
if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
|
if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
|
||||||
return NULL;
|
return NULL;
|
||||||
return fid->set_ret_type;
|
return fid->set_ret_type;
|
||||||
case EOLIAN_FUNCTION_POINTER:
|
|
||||||
return (fid->type != EOLIAN_FUNCTION_POINTER) ? NULL : fid->get_ret_type;
|
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -219,7 +218,8 @@ eolian_function_return_default_value_get(const Eolian_Function *fid, Eolian_Func
|
||||||
switch (ftype)
|
switch (ftype)
|
||||||
{
|
{
|
||||||
case EOLIAN_METHOD:
|
case EOLIAN_METHOD:
|
||||||
if (fid->type != EOLIAN_METHOD)
|
case EOLIAN_FUNCTION_POINTER:
|
||||||
|
if (fid->type != ftype)
|
||||||
return NULL;
|
return NULL;
|
||||||
return fid->get_ret_val;
|
return fid->get_ret_val;
|
||||||
case EOLIAN_PROP_GET:
|
case EOLIAN_PROP_GET:
|
||||||
|
@ -244,7 +244,8 @@ eolian_function_return_documentation_get(const Eolian_Function *fid, Eolian_Func
|
||||||
switch (ftype)
|
switch (ftype)
|
||||||
{
|
{
|
||||||
case EOLIAN_METHOD:
|
case EOLIAN_METHOD:
|
||||||
if (fid->type != EOLIAN_METHOD)
|
case EOLIAN_FUNCTION_POINTER:
|
||||||
|
if (fid->type != ftype)
|
||||||
return NULL;
|
return NULL;
|
||||||
return fid->get_return_doc;
|
return fid->get_return_doc;
|
||||||
case EOLIAN_PROP_GET:
|
case EOLIAN_PROP_GET:
|
||||||
|
@ -270,7 +271,8 @@ eolian_function_return_allow_unused(const Eolian_Function *fid,
|
||||||
switch (ftype)
|
switch (ftype)
|
||||||
{
|
{
|
||||||
case EOLIAN_METHOD:
|
case EOLIAN_METHOD:
|
||||||
if (fid->type != EOLIAN_METHOD)
|
case EOLIAN_FUNCTION_POINTER:
|
||||||
|
if (fid->type != ftype)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
return !fid->get_return_no_unused;
|
return !fid->get_return_no_unused;
|
||||||
case EOLIAN_PROP_GET:
|
case EOLIAN_PROP_GET:
|
||||||
|
@ -296,7 +298,8 @@ eolian_function_return_is_by_ref(const Eolian_Function *fid,
|
||||||
switch (ftype)
|
switch (ftype)
|
||||||
{
|
{
|
||||||
case EOLIAN_METHOD:
|
case EOLIAN_METHOD:
|
||||||
if (fid->type != EOLIAN_METHOD)
|
case EOLIAN_FUNCTION_POINTER:
|
||||||
|
if (fid->type != ftype)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
return fid->get_return_by_ref;
|
return fid->get_return_by_ref;
|
||||||
case EOLIAN_PROP_GET:
|
case EOLIAN_PROP_GET:
|
||||||
|
@ -322,7 +325,8 @@ eolian_function_return_is_move(const Eolian_Function *fid,
|
||||||
switch (ftype)
|
switch (ftype)
|
||||||
{
|
{
|
||||||
case EOLIAN_METHOD:
|
case EOLIAN_METHOD:
|
||||||
if (fid->type != EOLIAN_METHOD)
|
case EOLIAN_FUNCTION_POINTER:
|
||||||
|
if (fid->type != ftype)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
return fid->get_return_move;
|
return fid->get_return_move;
|
||||||
case EOLIAN_PROP_GET:
|
case EOLIAN_PROP_GET:
|
||||||
|
|
Loading…
Reference in New Issue