This fixes cases such as missing const when having a @by_ref
return type. The const should not be avoided there because it
is not returning the whole type as const, just what the pointer
dereferences to.
|| tp->type == EOLIAN_TYPE_CLASS
|| tp->type == EOLIAN_TYPE_VOID)
&& tp->is_const
- && ((ctype != EOLIAN_C_TYPE_RETURN) || database_type_is_ownable(NULL, tp, EINA_FALSE)))
+ && ((ctype != EOLIAN_C_TYPE_RETURN) || by_ref || database_type_is_ownable(NULL, tp, EINA_FALSE)))
{
eina_strbuf_append(buf, "const ");
}