]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
json-glib-1.0: Fix 'Json.Serializable' interface metadata
authorGuillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>
Mon, 4 Jul 2016 15:09:59 +0000 (11:09 -0400)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 21 Jul 2016 14:13:25 +0000 (16:13 +0200)
 - mark 'Serializable.find_property' nullable
 - mark 'Serializable.default_deserialize_property.value' as 'out'
   parameter

These should be fixed upstream with specific GIR annotations, but in the
meantime, it's important to have that interface usable.

Fix metadata indentation for, it was mixed with space and tabs.

https://bugzilla.gnome.org/show_bug.cgi?id=768380

vapi/json-glib-1.0.vapi
vapi/metadata/Json-1.0.metadata

index fc3c63d0e4031201ec049815b874a179b161c9f1..7ac4dc2a55968fff5bde898ae599b00a179f2f61 100644 (file)
@@ -307,12 +307,12 @@ namespace Json {
        [CCode (cheader_filename = "json-glib/json-glib.h,json-glib/json-gobject.h", type_id = "json_serializable_get_type ()")]
        public interface Serializable : GLib.Object {
                [Version (since = "0.10")]
-               public bool default_deserialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
+               public bool default_deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
                [Version (since = "0.10")]
                public Json.Node default_serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec);
                public abstract bool deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
                [Version (since = "0.14")]
-               public abstract unowned GLib.ParamSpec find_property (string name);
+               public abstract unowned GLib.ParamSpec? find_property (string name);
                [Version (since = "0.14")]
                public abstract GLib.Value get_property (GLib.ParamSpec pspec);
                [CCode (array_length_pos = 0.1, array_length_type = "guint")]
index 937ab25829366e297d392665484dc4bb093da64b..19941168043aa466546138f3c19d402d050b8466 100644 (file)
@@ -26,6 +26,8 @@ gvariant_deserialize_data unowned=false floating
 
 Object.add_member replacement="Json.Object.set_member"
 Serializable cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h"
-            .deserialize_property.value out
+       .default_deserialize_property.value out
+       .deserialize_property.value out
+       .find_property nullable
 construct_gobject cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h" replacement="Json.gobject_from_data"
 serialize_gobject cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h" replacement="Json.gobject_to_data"