From: Guillaume Poirier-Morency Date: Mon, 4 Jul 2016 15:09:59 +0000 (-0400) Subject: json-glib-1.0: Fix 'Json.Serializable' interface metadata X-Git-Tag: 0.33.1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28fa5311c35522e9ade4b101fb4c81401d01f18a;p=thirdparty%2Fvala.git json-glib-1.0: Fix 'Json.Serializable' interface metadata - 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 --- diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi index fc3c63d0e..7ac4dc2a5 100644 --- a/vapi/json-glib-1.0.vapi +++ b/vapi/json-glib-1.0.vapi @@ -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")] diff --git a/vapi/metadata/Json-1.0.metadata b/vapi/metadata/Json-1.0.metadata index 937ab2582..199411680 100644 --- a/vapi/metadata/Json-1.0.metadata +++ b/vapi/metadata/Json-1.0.metadata @@ -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"