aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-04-17 20:09:44 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-04-17 20:31:55 +0200
commitfcae7cab276c2d3b19bb913ad908b67b7dd33089 (patch)
tree7008ebc815184309ccc284c9e7e1b05abbb55028 /src/bin/eolian
parentecore_wl2: handle configure_complete after handling configure (diff)
downloadefl-fcae7cab276c2d3b19bb913ad908b67b7dd33089.tar.gz
eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously, methods tagged @const had both their external prototype and internal impl generated with const on object, while property getters only had const on the external API. This is now changed and it all has const everywhere. Ref https://phab.enlightenment.org/T6859.
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/sources.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 6d8ffe3e0a..7120496605 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -533,7 +533,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append(buf, func_suffix);
/* ([const ]Eo *obj, Data_Type *pd, impl_full_params); */
eina_strbuf_append_char(buf, '(');
- if (eolian_function_object_is_const(fid))
+ if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
eina_strbuf_append(buf, "const ");
eina_strbuf_append(buf, "Eo *obj, ");
eina_strbuf_append(buf, dt);
@@ -564,7 +564,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append(buf, eolian_function_name_get(fid));
eina_strbuf_append(buf, func_suffix);
eina_strbuf_append_char(buf, '(');
- if (eolian_function_object_is_const(fid))
+ if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
eina_strbuf_append(buf, "const ");
eina_strbuf_append(buf, "Eo *obj");
if (is_empty || is_auto)
@@ -1147,7 +1147,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append_printf(buf, "\n%s(", fname);
- if (eolian_function_object_is_const(fid))
+ if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
eina_strbuf_append(buf, "const ");
eina_strbuf_append(buf, "Eo *obj, ");