summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo1_generator.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-11 15:17:12 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-11 15:43:46 +0200
commitfd67c1692c9385c4edbc314d2edc12c13cf9e429 (patch)
tree1f3af0a22274faaccf53016cc1db607b837085f5 /src/bin/eolian/eo1_generator.c
parentd3f343bdcced4ab88ef694fc900b978f4b2cfe75 (diff)
Eolian/Generator: fix generation for return values.
- Remove space between type and variable if a star is present. - Initialize return value to NULL before eo_do. It is needed in case the eo_do invocation fails (NULL object...). - Add const to the internal return value if needed.
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/eo1_generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index 0b02d5b758..7ca7628411 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -431,7 +431,7 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun
431 ret_const?"const ":"", 431 ret_const?"const ":"",
432 rettype, had_star?"":" "); 432 rettype, had_star?"":" ");
433 Eina_Strbuf *ret_param = eina_strbuf_new(); 433 Eina_Strbuf *ret_param = eina_strbuf_new();
434 if (rettype) eina_strbuf_append_printf(ret_param, "%s _%s = ", rettype, retname); 434 if (rettype) eina_strbuf_append_printf(ret_param, "%s%s%s_%s = ", ret_const?"const ":"", rettype, had_star?"":" ", retname);
435 eina_strbuf_replace_all(fbody, "@#ret_param", eina_strbuf_string_get(ret_param)); 435 eina_strbuf_replace_all(fbody, "@#ret_param", eina_strbuf_string_get(ret_param));
436 sprintf(tmpstr, "%s%s", ret_const?"const ":"", rettype); 436 sprintf(tmpstr, "%s%s", ret_const?"const ":"", rettype);
437 eina_strbuf_replace_all(fbody, "@#ret_type", tmpstr); 437 eina_strbuf_replace_all(fbody, "@#ret_type", tmpstr);