[vala/0.10] D-Bus: Report error on invalid use of register_object in GDBus servers
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.10] D-Bus: Report error on invalid use of register_object in GDBus servers
- Date: Tue, 26 Oct 2010 18:30:03 +0000 (UTC)
commit 33768c833d97e077083e7fedf3ea05000087aa52
Author: Jürg Billeter <j bitron ch>
Date: Wed Oct 20 23:43:25 2010 +0200
D-Bus: Report error on invalid use of register_object in GDBus servers
codegen/valagdbusservermodule.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index bb5ec96..066d969 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -1029,6 +1029,11 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var ma = (MemberAccess) expr.call;
var type_arg = (ObjectType) ma.get_type_arguments ().get (0);
+ if (get_dbus_name (type_arg.type_symbol) == null) {
+ Report.error (expr.source_reference, "DBusConnection.register_object requires type argument with [DBus (name = ...)] attribute");
+ return;
+ }
+
var args = expr.get_argument_list ();
var path_arg = args[0];
var obj_arg = args[1];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]