summaryrefslogtreecommitdiff
path: root/recipes/vala/files/static-dbus-methods.patch
blob: 7bf41448601395e551ca6f54afecd7e15f16211d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Frederik Sdun <frederik.sdun@googlemail.com>
Hi,

I figured out that vala generates wrong code on static methods. It tries
to add a user_data pointer, but then the C function has no void*
user_data.

I appended a diff which fixes the problem for me.

Regards, Frederik

Index: vala/gobject/valadbusclientmodule.vala
===================================================================
--- vala/gobject/valadbusclientmodule.vala	(Revision 2430)
+++ vala/gobject/valadbusclientmodule.vala	(Arbeitskopie)
@@ -133,7 +133,9 @@
 			cend_call.add_argument (new CCodeIdentifier ("call"));
 			cend_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("error")));
 			var creply_call = new CCodeFunctionCall ((CCodeExpression) callback.ccodenode);
-			creply_call.add_argument (new CCodeIdentifier ("user_data"));
+                        if( reply_method.binding != MemberBinding.STATIC ) {
+			    creply_call.add_argument (new CCodeIdentifier ("user_data"));
+                        }
 			int param_count = reply_method.get_parameters ().size;
 			int i = 0;
 			foreach (FormalParameter param in reply_method.get_parameters ()) {