[vala/wip/dbusgen: 61/62] Use GLib.ObjectPath instead of string



commit 783e7ba3a4ec614847c54cfe5fa0159c35c428b2
Author: Chris Daley <chebizarro gmail com>
Date:   Sun Nov 26 14:07:43 2017 -0800

    Use GLib.ObjectPath instead of string

 dbusgen/valadbusvariantmodule.vala |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/dbusgen/valadbusvariantmodule.vala b/dbusgen/valadbusvariantmodule.vala
index 7bdd69e..578c76b 100644
--- a/dbusgen/valadbusvariantmodule.vala
+++ b/dbusgen/valadbusvariantmodule.vala
@@ -43,6 +43,7 @@ public class Vala.DBusVariantModule {
        public DataType int64_type;
        public DataType uint64_type;
        public DataType string_type;
+       public DataType object_path_type;
        public DataType float_type;
        public DataType double_type;
        public TypeSymbol gtype_type;
@@ -82,7 +83,10 @@ public class Vala.DBusVariantModule {
 
                var glib_ns = root_symbol.scope.lookup ("GLib");
 
-               var ghashtable_type = (TypeSymbol) glib_ns.scope.lookup ("HashTable");
+               object_path_type = new ObjectType ((Class) glib_ns.scope.lookup ("ObjectPath"));
+               object_path_type.value_owned = true;
+
+               TypeSymbol ghashtable_type = (TypeSymbol) glib_ns.scope.lookup ("HashTable");
                gtype_type = (TypeSymbol) glib_ns.scope.lookup ("Type");
                gobject_type = (TypeSymbol) glib_ns.scope.lookup ("Object");
                gerror_type = new ErrorType (null, null);
@@ -135,7 +139,7 @@ public class Vala.DBusVariantModule {
                        } else if (type.equal (VariantType.STRING)) {
                                return string_type.copy ();
                        } else if (type.equal (VariantType.OBJECT_PATH)) {
-                               return string_type.copy ();
+                               return object_path_type.copy ();
                        } else if (type.equal (VariantType.SIGNATURE)) {
                                return string_type.copy ();
                        } else if (type.equal (VariantType.HANDLE)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]