vala r1381 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1381 - in trunk: . gobject
- Date: Mon, 12 May 2008 22:15:24 +0100 (BST)
Author: juergbi
Date: Mon May 12 21:15:24 2008
New Revision: 1381
URL: http://svn.gnome.org/viewvc/vala?rev=1381&view=rev
Log:
2008-05-12 Juerg Billeter <j bitron ch>
* gobject/valaccodeclassbinding.vala: support methods throwing
exceptions in D-Bus services, patch by Ali Sabil
Modified:
trunk/ChangeLog
trunk/gobject/valaccodeclassbinding.vala
Modified: trunk/gobject/valaccodeclassbinding.vala
==============================================================================
--- trunk/gobject/valaccodeclassbinding.vala (original)
+++ trunk/gobject/valaccodeclassbinding.vala Mon May 12 21:15:24 2008
@@ -769,15 +769,27 @@
continue;
}
+ Gee.Collection<FormalParameter> parameters;
+
+ if (m.get_error_domains ().size > 0) {
+ parameters = new Gee.ArrayList<FormalParameter> ();
+ foreach (FormalParameter param in m.get_parameters ()) {
+ parameters.add (param);
+ }
+ parameters.add (new FormalParameter ("error", codegen.gerror_type));
+ } else {
+ parameters = m.get_parameters ();
+ }
+
dbus_methods.append ("{ (GCallback) ");
dbus_methods.append (m.get_cname ());
dbus_methods.append (", ");
- dbus_methods.append (codegen.get_marshaller_function (m.get_parameters (), m.return_type));
+ dbus_methods.append (codegen.get_marshaller_function (parameters, m.return_type));
dbus_methods.append (", ");
dbus_methods.append (blob_len.to_string ());
dbus_methods.append (" },\n");
- codegen.generate_marshaller (m.get_parameters (), m.return_type);
+ codegen.generate_marshaller (parameters, m.return_type);
long start = blob.len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]