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: gobject/valadbusclientmodule.vala
===================================================================
--- gobject/valadbusclientmodule.vala	(Revision 2430)
+++ 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 ()) {

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to