summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-09-30 14:27:22 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 11:54:23 +0200
commitbedba4f423c01b2912626bebadd10e7c3df57290 (patch)
treec86434e9c7ddd17b60685d4185709c5cf09fd464 /src
parenta307f470a15e7ec8039df4459e65ba9c2ce3fa7d (diff)
downloadefl-bedba4f423c01b2912626bebadd10e7c3df57290.tar.gz
eolian gen2: fix generation of legacy class method wrappers
Diffstat (limited to 'src')
-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,
eina_strbuf_append(lbuf, lfn);
/* param list */
eina_strbuf_append_char(lbuf, '(');
+ /* for class funcs, offset the params to remove comma */
+ int poff = 2;
if (!eolian_function_is_class(fid))
{
+ /* non-class funcs have the obj though */
+ poff = 0;
if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
eina_strbuf_append(lbuf, "const ");
eina_strbuf_append_printf(lbuf, "%s *obj", cname);
}
- eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full));
+ eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full) + poff);
eina_strbuf_append(lbuf, ")\n{\n");
/* body */
if (strcmp(rtpn, "void"))