]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Use GLib.ObjectPath instead of string
authorChris Daley <chebizarro@gmail.com>
Sun, 26 Nov 2017 22:07:43 +0000 (14:07 -0800)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 29 Apr 2023 19:00:17 +0000 (21:00 +0200)
dbusgen/valadbusvariantmodule.vala

index 7bdd69e1adde661fff32e0826cd6fe4447803987..578c76b24b996a61a1380da1a4dfeade4f567bbc 100644 (file)
@@ -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)) {