summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/eolian2/sources.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/eolian2/sources.c b/src/bin/eolian2/sources.c
index ba3f47a9ef..c64d05ceeb 100644
--- a/src/bin/eolian2/sources.c
+++ b/src/bin/eolian2/sources.c
@@ -431,13 +431,17 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
431 eina_strbuf_append(lbuf, lfn); 431 eina_strbuf_append(lbuf, lfn);
432 /* param list */ 432 /* param list */
433 eina_strbuf_append_char(lbuf, '('); 433 eina_strbuf_append_char(lbuf, '(');
434 /* for class funcs, offset the params to remove comma */
435 int poff = 2;
434 if (!eolian_function_is_class(fid)) 436 if (!eolian_function_is_class(fid))
435 { 437 {
438 /* non-class funcs have the obj though */
439 poff = 0;
436 if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid)) 440 if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
437 eina_strbuf_append(lbuf, "const "); 441 eina_strbuf_append(lbuf, "const ");
438 eina_strbuf_append_printf(lbuf, "%s *obj", cname); 442 eina_strbuf_append_printf(lbuf, "%s *obj", cname);
439 } 443 }
440 eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full)); 444 eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full) + poff);
441 eina_strbuf_append(lbuf, ")\n{\n"); 445 eina_strbuf_append(lbuf, ")\n{\n");
442 /* body */ 446 /* body */
443 if (strcmp(rtpn, "void")) 447 if (strcmp(rtpn, "void"))