summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 15:58:48 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 16:27:54 +0200
commitd7397aca4d0149af775c169e43ad60b555063487 (patch)
treeb8179c39725e4574e152d7b24485299feb3840df /src/lib/eolian
parent0275ef0f33f017ad5a6cb681f1b108a2769c428f (diff)
eolian: proper error message for @by_ref on pointer types
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/database_validate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 6d13d53ac0..a8e270c640 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -218,8 +218,11 @@ _validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, Eina_Bool move)
218 database_type_is_ownable(tp->base.unit, tp, EINA_FALSE); 218 database_type_is_ownable(tp->base.unit, tp, EINA_FALSE);
219 219
220 /* only allow value types when @by_ref */ 220 /* only allow value types when @by_ref */
221 if (by_ref && !maybe_ownable) 221 if (by_ref && maybe_ownable)
222 return EINA_FALSE; 222 {
223 _eo_parser_log(&tp->base, "@by_ref is only allowed for value types");
224 return EINA_FALSE;
225 }
223 226
224 /* futures can be whatever... */ 227 /* futures can be whatever... */
225 if (tp->btype == EOLIAN_TYPE_BUILTIN_FUTURE) 228 if (tp->btype == EOLIAN_TYPE_BUILTIN_FUTURE)
@@ -229,7 +232,7 @@ _validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, Eina_Bool move)
229 if (!move) 232 if (!move)
230 return EINA_TRUE; 233 return EINA_TRUE;
231 234
232 /* marked @move, now pointer-like or otherwise ownable, error */ 235 /* marked @move, not pointer-like or otherwise ownable, error */
233 if (!maybe_ownable || !tp->ownable) 236 if (!maybe_ownable || !tp->ownable)
234 { 237 {
235 _eo_parser_log(&tp->base, "type '%s' is not ownable", tp->base.name); 238 _eo_parser_log(&tp->base, "type '%s' is not ownable", tp->base.name);