Commit d84521d2 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Support error handling when dynamically calling void methods, patch by

2009-02-20  Jürg Billeter  <j@bitron.ch>

	* gobject/valadbusclientmodule.vala:

	Support error handling when dynamically calling void methods,
	patch by Frederik Sdun, fixes bug 571258

svn path=/trunk/; revision=2464
parent 5e777335
2009-02-20 Jürg Billeter <j@bitron.ch>
* gobject/valadbusclientmodule.vala:
Support error handling when dynamically calling void methods,
patch by Frederik Sdun, fixes bug 571258
2009-02-20 Jürg Billeter <j@bitron.ch>
* gobject-introspection/scanner.c:
......
......@@ -30,6 +30,7 @@ Evan Nemerson
Florian Brosch
Francisco Camenforte Torres
Frederik
Frederik Sdun
Gabriel Falcão
Geert Jan Alsem
Götz Waschk
......
......@@ -184,12 +184,10 @@ internal class Vala.DBusClientModule : DBusModule {
ccall.add_argument (new CCodeIdentifier (cb_fun.name));
ccall.add_argument (new CCodeConstant ("param%d_target".printf (callback_index)));
ccall.add_argument (new CCodeConstant ("NULL"));
} else if (found_out || !(method.return_type is VoidType)) {
} else {
ccall.call = new CCodeIdentifier ("dbus_g_proxy_call");
ccall.add_argument (new CCodeIdentifier ("error"));
} else {
ccall.call = new CCodeIdentifier ("dbus_g_proxy_call_no_reply");
}
foreach (FormalParameter param in method.get_parameters ()) {
......@@ -433,9 +431,7 @@ internal class Vala.DBusClientModule : DBusModule {
block.add_statement (new CCodeReturnStatement (new CCodeIdentifier ("result")));
}
} else {
if (found_out) {
ccall.add_argument (new CCodeIdentifier ("G_TYPE_INVALID"));
}
ccall.add_argument (new CCodeIdentifier ("G_TYPE_INVALID"));
block.add_statement (new CCodeExpressionStatement (ccall));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment