forked from enlightenment/efl
eolian: enable duplicate validation but only warn for now
Use the EOLIAN_WARN_FUNC_DUPLICATES environment variable to enable those warnings.
This commit is contained in:
parent
61f4a5e033
commit
c46f9bec2d
|
@ -297,7 +297,8 @@ _validate_function(Eolian_Function *func, Eina_Hash *nhash)
|
||||||
"function '%s' redefined (originally at %s:%d:%d)",
|
"function '%s' redefined (originally at %s:%d:%d)",
|
||||||
func->name, ofunc->base.file,
|
func->name, ofunc->base.file,
|
||||||
ofunc->base.line, ofunc->base.column);
|
ofunc->base.line, ofunc->base.column);
|
||||||
return _obj_error(&func->base, buf);
|
if (getenv("EOLIAN_WARN_FUNC_DUPLICATES"))
|
||||||
|
_obj_error(&func->base, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (func->get_ret_type && !_validate_type(func->get_ret_type))
|
if (func->get_ret_type && !_validate_type(func->get_ret_type))
|
||||||
|
@ -333,6 +334,10 @@ _validate_function(Eolian_Function *func, Eina_Hash *nhash)
|
||||||
if (!_validate_doc(func->set_return_doc))
|
if (!_validate_doc(func->set_return_doc))
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
/* just for now, when dups become errors there will be no need to check */
|
||||||
|
if (!ofunc)
|
||||||
|
eina_hash_add(nhash, func->name, func);
|
||||||
|
|
||||||
return _validate(&func->base);
|
return _validate(&func->base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue