summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-10 14:17:25 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-10 14:17:53 +0200
commitb6815a2f998846fa0c53da3a142d406041109bf0 (patch)
tree2ab397e9cf91db4d3b17c0489969a83c36677fd5 /src
parent5cd851ea25bca17ef551658c9cb9a1e098d0da06 (diff)
eolian: account for @by_ref when serializing return types
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eolian/database_type.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 6381cf8496..52973fb453 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -107,7 +107,7 @@ database_type_to_str(const Eolian_Type *tp,
107 || tp->type == EOLIAN_TYPE_CLASS 107 || tp->type == EOLIAN_TYPE_CLASS
108 || tp->type == EOLIAN_TYPE_VOID) 108 || tp->type == EOLIAN_TYPE_VOID)
109 && tp->is_const 109 && tp->is_const
110 && ((ctype != EOLIAN_C_TYPE_RETURN) || database_type_is_ownable(NULL, tp, EINA_FALSE))) 110 && ((ctype != EOLIAN_C_TYPE_RETURN) || by_ref || database_type_is_ownable(NULL, tp, EINA_FALSE)))
111 { 111 {
112 eina_strbuf_append(buf, "const "); 112 eina_strbuf_append(buf, "const ");
113 } 113 }