summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 12:58:22 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 12:58:22 +0200
commitb15d0583e75a79f434296327e0d5bdd484eddfe2 (patch)
treef88c932e0200e3d526a4b4f19ed126167fd3a387
parent7ef0b84f0397fcb83ef57efbcc7f428444e838dc (diff)
eolian gen2: fix minor issues with c file generation
-rw-r--r--src/bin/eolian2/sources.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/eolian2/sources.c b/src/bin/eolian2/sources.c
index e51b5f33ab..2c95db5700 100644
--- a/src/bin/eolian2/sources.c
+++ b/src/bin/eolian2/sources.c
@@ -173,7 +173,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
173 } 173 }
174 eina_strbuf_append(params_full, prn); 174 eina_strbuf_append(params_full, prn);
175 eina_strbuf_append(params_full_imp, prn); 175 eina_strbuf_append(params_full_imp, prn);
176 if (is_empty) 176 if (is_empty || is_auto)
177 eina_strbuf_append(params_full_imp, " EINA_UNUSED"); 177 eina_strbuf_append(params_full_imp, " EINA_UNUSED");
178 178
179 eina_stringshare_del(ptn); 179 eina_stringshare_del(ptn);
@@ -243,7 +243,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
243 eina_strbuf_append_printf(params_init, " %s = pd->%s;\n", prn, prn); 243 eina_strbuf_append_printf(params_init, " %s = pd->%s;\n", prn, prn);
244 else 244 else
245 { 245 {
246 eina_strbuf_append_printf(params_init, " if (%s) *%s = pd->%s\n", 246 eina_strbuf_append_printf(params_init, " if (%s) *%s = pd->%s;\n",
247 prn, prn, prn); 247 prn, prn, prn);
248 } 248 }
249 } 249 }
@@ -350,6 +350,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
350 eina_strbuf_append(buf, ", "); 350 eina_strbuf_append(buf, ", ");
351 eina_strbuf_append(buf, adt); 351 eina_strbuf_append(buf, adt);
352 eina_strbuf_append(buf, " *pd"); 352 eina_strbuf_append(buf, " *pd");
353 if (is_empty || (is_auto && !eina_strbuf_length_get(params_init)))
354 eina_strbuf_append(buf, " EINA_UNUSED");
353 eina_strbuf_append(buf, eina_strbuf_string_get(params_full_imp)); 355 eina_strbuf_append(buf, eina_strbuf_string_get(params_full_imp));
354 eina_strbuf_append(buf, ")\n{\n"); 356 eina_strbuf_append(buf, ")\n{\n");
355 } 357 }