]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Fix GDBusProxy::g-properties-changed binding
authorJürg Billeter <j@bitron.ch>
Tue, 25 Jan 2011 12:56:14 +0000 (13:56 +0100)
committerJürg Billeter <j@bitron.ch>
Tue, 25 Jan 2011 12:56:14 +0000 (13:56 +0100)
vala/valacodewriter.vala
vapi/gio-2.0.vapi
vapi/packages/gio-2.0/gio-2.0.metadata
vapigen/valagidlparser.vala

index 62f1d0758e3df0470cb7eea6154d6a46f14a11a7..49806e037220f598a2f82ce9db41b32ce0eb4b5b 100644 (file)
@@ -864,6 +864,10 @@ public class Vala.CodeWriter : CodeVisitor {
                                ccode_params.append_printf ("%sarray_length = false", separator);
                                separator = ", ";
                        }
+                       if (param.array_null_terminated && param.variable_type is ArrayType) {
+                               ccode_params.append_printf ("%sarray_null_terminated = true", separator);
+                               separator = ", ";
+                       }
                        if (param.array_length_type != null && param.variable_type is ArrayType) {
                                ccode_params.append_printf ("%sarray_length_type = \"%s\"", separator, param.array_length_type);
                                separator = ", ";
index 7f899fd3e8d3738b69255470d1bd7789723cf450..f3b83f4a226ca05c45810befadceeaa3d817dc47 100644 (file)
@@ -482,7 +482,7 @@ namespace GLib {
                public string g_name_owner { owned get; }
                [NoAccessorMethod]
                public string g_object_path { owned get; construct; }
-               public virtual signal void g_properties_changed (GLib.Variant changed_properties, string[] invalidated_properties);
+               public virtual signal void g_properties_changed (GLib.Variant changed_properties, [CCode (array_length = false, array_null_terminated = true)] string[] invalidated_properties);
                public virtual signal void g_signal (string sender_name, string signal_name, GLib.Variant parameters);
        }
        [CCode (cheader_filename = "gio/gio.h")]
index 3260a3c57bb67fe70b9ea01aaae5053e01188390..754f92be4c8bf79c2ce4a3b5ec05f096d496571b 100644 (file)
@@ -93,6 +93,7 @@ GDBusMethodInfo.out_args is_array="1"
 GDBusNodeInfo.annotations is_array="1"
 GDBusNodeInfo.interfaces is_array="1"
 GDBusNodeInfo.nodes is_array="1"
+GDBusProxy::g_properties_changed.invalidated_properties no_array_length="1" array_null_terminated="1"
 g_dbus_proxy_call async="1"
 g_dbus_proxy_call.parameters nullable="1"
 g_dbus_proxy_call_finish transfer_ownership="1"
index 81978d1a1741bd9d70f20f912eb316b3f2b8d71e..fdcfdade013281a5b7e73cb6491df724890729e4 100644 (file)
@@ -2766,6 +2766,17 @@ public class Vala.GIdlParser : CodeVisitor {
                                                        p.variable_type = param_type;
                                                        p.direction = ParameterDirection.IN;
                                                }
+                                       } else if (nv[0] == "no_array_length") {
+                                               if (eval (nv[1]) == "1") {
+                                                       p.no_array_length = true;
+                                               }
+                                       } else if (nv[0] == "array_length_type") {
+                                               p.array_length_type = eval (nv[1]);
+                                       } else if (nv[0] == "array_null_terminated") {
+                                               if (eval (nv[1]) == "1") {
+                                                       p.no_array_length = true;
+                                                       p.array_null_terminated = true;
+                                               }
                                        } else if (nv[0] == "is_out") {
                                                if (eval (nv[1]) == "1") {
                                                        p.direction = ParameterDirection.OUT;