summaryrefslogtreecommitdiff
path: root/recipes/vala/files/static-dbus-methods.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/vala/files/static-dbus-methods.patch')
-rw-r--r--recipes/vala/files/static-dbus-methods.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/recipes/vala/files/static-dbus-methods.patch b/recipes/vala/files/static-dbus-methods.patch
new file mode 100644
index 0000000000..7bf4144860
--- /dev/null
+++ b/recipes/vala/files/static-dbus-methods.patch
@@ -0,0 +1,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 ()) {