summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo1_generator.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-13 08:32:56 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-13 09:14:14 +0200
commitdcf94e9dd8767b08205c3e5d887a23f54d56e479 (patch)
tree9bd5fd1cffb7fe0268259289a8207e8af2292d7e /src/bin/eolian/eo1_generator.c
parentd3bc06ae33320f07d6448fc114ce488e785686f1 (diff)
Eolian/Generator: fix generation of headers for const params.
When a parameter of a property is const for get but not for set, the .eo file indicates it by setting a flag 'const' for this parameter. The generation was checking this flag for C files generation but not for H files.
Diffstat (limited to 'src/bin/eolian/eo1_generator.c')
-rw-r--r--src/bin/eolian/eo1_generator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index 7ca7628411..a50a8fde29 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -195,6 +195,7 @@ eo1_fundef_generate(const char *classname, Eolian_Function func, Eolian_Function
195 Eina_Bool add_star = EINA_FALSE; 195 Eina_Bool add_star = EINA_FALSE;
196 Eolian_Parameter_Dir pdir; 196 Eolian_Parameter_Dir pdir;
197 eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, &pdesc); 197 eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, &pdesc);
198 Eina_Bool is_const = eolian_parameter_get_const_attribute_get(data);
198 if (ftype == GET) { 199 if (ftype == GET) {
199 add_star = EINA_TRUE; 200 add_star = EINA_TRUE;
200 pdir = EOLIAN_OUT_PARAM; 201 pdir = EOLIAN_OUT_PARAM;
@@ -210,7 +211,9 @@ eo1_fundef_generate(const char *classname, Eolian_Function func, Eolian_Function
210 if (eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, ", "); 211 if (eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, ", ");
211 eina_strbuf_append(str_par, pname); 212 eina_strbuf_append(str_par, pname);
212 213
213 eina_strbuf_append_printf(str_typecheck, ", EO_TYPECHECK(%s%s%s, %s)", ptype, had_star?"":" ", add_star?"*":"", pname); 214 eina_strbuf_append_printf(str_typecheck, ", EO_TYPECHECK(%s%s%s%s, %s)",
215 is_const?"const ":"",
216 ptype, had_star?"":" ", add_star?"*":"", pname);
214 } 217 }
215 218
216 const char* rettype = eolian_function_return_type_get(func, ftype); 219 const char* rettype = eolian_function_return_type_get(func, ftype);