Skip to content

Commit 28fa531

Browse files
arteymixricotz
authored andcommitted
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
1 parent e017c96 commit 28fa531

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

vapi/json-glib-1.0.vapi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,12 @@ namespace Json {
307307
[CCode (cheader_filename = "json-glib/json-glib.h,json-glib/json-gobject.h", type_id = "json_serializable_get_type ()")]
308308
public interface Serializable : GLib.Object {
309309
[Version (since = "0.10")]
310-
public bool default_deserialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
310+
public bool default_deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
311311
[Version (since = "0.10")]
312312
public Json.Node default_serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec);
313313
public abstract bool deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node);
314314
[Version (since = "0.14")]
315-
public abstract unowned GLib.ParamSpec find_property (string name);
315+
public abstract unowned GLib.ParamSpec? find_property (string name);
316316
[Version (since = "0.14")]
317317
public abstract GLib.Value get_property (GLib.ParamSpec pspec);
318318
[CCode (array_length_pos = 0.1, array_length_type = "guint")]

vapi/metadata/Json-1.0.metadata

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ gvariant_deserialize_data unowned=false floating
2626

2727
Object.add_member replacement="Json.Object.set_member"
2828
Serializable cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h"
29-
.deserialize_property.value out
29+
.default_deserialize_property.value out
30+
.deserialize_property.value out
31+
.find_property nullable
3032
construct_gobject cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h" replacement="Json.gobject_from_data"
3133
serialize_gobject cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h" replacement="Json.gobject_to_data"

0 commit comments

Comments
 (0)