summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-22 11:38:00 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-23 18:09:36 +0200
commit3eb7b3793b0afcc79143a74a4052cb6179334f08 (patch)
tree116799cf117a08a098860f09c278b46a94c1cb9e /src/bin/eolian
parent253e18159bbc601972cad4b3b42bbbe23cbf390d (diff)
eolian: start to express ownership transfere
before @owned was not even expressed in the api definitions of the generated APIs, this adds support for it. @owned is now expressed with EFL_TRANSFER_OWNERSHIP in a arguments. And that preprocessor directive is documented. Reviewed-by: Daniel Kolesa <daniel@octaforge.org> Differential Revision: https://phab.enlightenment.org/D9369
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/headers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 7aab755..a4a20c4 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -35,6 +35,8 @@ _gen_param(Eina_Strbuf *buf, Eolian_Function_Parameter *pr,
35 eina_strbuf_append(buf, _get_add_star(ftype, eolian_parameter_direction_get(pr))); 35 eina_strbuf_append(buf, _get_add_star(ftype, eolian_parameter_direction_get(pr)));
36 eina_strbuf_append(buf, prn); 36 eina_strbuf_append(buf, prn);
37 eina_stringshare_del(prtn); 37 eina_stringshare_del(prtn);
38 if (eolian_type_is_owned(eolian_parameter_type_get(pr)))
39 eina_strbuf_append(buf, " EFL_TRANSFER_OWNERSHIP");
38 *rpid = 0; 40 *rpid = 0;
39 return 1; 41 return 1;
40} 42}
@@ -166,6 +168,8 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
166 flagbuf = eina_strbuf_new(); 168 flagbuf = eina_strbuf_new();
167 eina_strbuf_prepend(flagbuf, " EINA_WARN_UNUSED_RESULT"); 169 eina_strbuf_prepend(flagbuf, " EINA_WARN_UNUSED_RESULT");
168 } 170 }
171 if (rtp && eolian_type_is_owned(rtp))
172 eina_strbuf_append(buf, " EFL_TRANSFER_OWNERSHIP");
169 if (flagbuf) 173 if (flagbuf)
170 { 174 {
171 eina_strbuf_append(buf, eina_strbuf_string_get(flagbuf)); 175 eina_strbuf_append(buf, eina_strbuf_string_get(flagbuf));