Eolian_Expression *expr,
const Eolian_Type *tp,
Eolian_Expression_Mask msk);
+static Eina_Bool _validate_function(const Eolian_Unit *src,
+ Eolian_Function *func,
+ Eina_Hash *nhash);
typedef struct _Cb_Ret
{
return _validate(&tp->base);
}
case EOLIAN_TYPEDECL_FUNCTION_POINTER:
- // FIXME validate functions here
+ if (!_validate_function(src, tp->function_pointer, NULL))
+ return EINA_FALSE;
return _validate(&tp->base);
default:
return EINA_FALSE;
_validate_type(const Eolian_Unit *src, Eolian_Type *tp)
{
char buf[256];
-
if (tp->owned && !database_type_is_ownable(src, tp))
{
snprintf(buf, sizeof(buf), "type '%s' is not ownable", tp->full_name);
else _duplicates_warn = atoi(s);
}
- const Eolian_Function *ofunc = eina_hash_find(nhash, func->name);
+ const Eolian_Function *ofunc = nhash ? eina_hash_find(nhash, func->name) : NULL;
if (EINA_UNLIKELY(ofunc && (_duplicates_warn > 0)))
{
snprintf(buf, sizeof(buf),
return EINA_FALSE;
/* just for now, when dups become errors there will be no need to check */
- if (!ofunc)
+ if (!ofunc && nhash)
eina_hash_add(nhash, func->name, func);
return _validate(&func->base);