]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
json-glib-1.0: Change abstract methods of Serializable to virtual
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 2 Sep 2019 19:35:00 +0000 (21:35 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 2 Sep 2019 19:50:51 +0000 (21:50 +0200)
All those interface methods have default implementations. Additionally drop
superfluous metadata.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/840

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

index 45d23e27d7817291ea3558576e90f594735b6cb2..4a06d2a061f2d53eba305d034672b1a667390440 100644 (file)
@@ -316,23 +316,23 @@ namespace Json {
                [NoAccessorMethod]
                public Json.Node root { owned get; set construct; }
        }
-       [CCode (cheader_filename = "json-glib/json-glib.h,json-glib/json-gobject.h", type_id = "json_serializable_get_type ()")]
+       [CCode (cheader_filename = "json-glib/json-glib.h", type_id = "json_serializable_get_type ()")]
        public interface Serializable : GLib.Object {
                [Version (since = "0.10")]
                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);
+               public virtual 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 virtual unowned GLib.ParamSpec? find_property (string name);
                [Version (since = "0.14")]
-               public abstract GLib.Value get_property (GLib.ParamSpec pspec);
+               public virtual GLib.Value get_property (GLib.ParamSpec pspec);
                [CCode (array_length_pos = 0.1, array_length_type = "guint")]
                [Version (since = "0.14")]
-               public (unowned GLib.ParamSpec)[] list_properties ();
-               public abstract Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec);
+               public virtual (unowned GLib.ParamSpec)[] list_properties ();
+               public virtual Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec);
                [Version (since = "0.14")]
-               public abstract void set_property (GLib.ParamSpec pspec, GLib.Value value);
+               public virtual void set_property (GLib.ParamSpec pspec, GLib.Value value);
        }
        [CCode (cheader_filename = "json-glib/json-glib.h", has_type_id = false)]
        [Version (since = "1.2")]
@@ -417,7 +417,7 @@ namespace Json {
        [CCode (cheader_filename = "json-glib/json-glib.h")]
        [Version (since = "0.10")]
        public static Json.Node? boxed_serialize (GLib.Type gboxed_type, void* boxed);
-       [CCode (cheader_filename = "json-glib/json-glib.h,json-glib/json-gobject.h")]
+       [CCode (cheader_filename = "json-glib/json-glib.h")]
        [Version (deprecated = true, deprecated_since = "0.10", replacement = "Json.gobject_from_data", since = "0.4")]
        public static GLib.Object construct_gobject (GLib.Type gtype, string data, size_t length) throws GLib.Error;
        [CCode (cheader_filename = "json-glib/json-glib.h")]
@@ -447,7 +447,7 @@ namespace Json {
        [CCode (cheader_filename = "json-glib/json-glib.h")]
        [Version (since = "0.14")]
        public static string gvariant_serialize_data (GLib.Variant variant, out size_t length);
-       [CCode (cheader_filename = "json-glib/json-glib.h,json-glib/json-gobject.h")]
+       [CCode (cheader_filename = "json-glib/json-glib.h")]
        [Version (deprecated = true, deprecated_since = "0.10", replacement = "Json.gobject_to_data")]
        public static string serialize_gobject (GLib.Object gobject, out size_t length);
        [CCode (cheader_filename = "json-glib/json-glib.h")]
index 79df8a07e3f14cc15227e04c550bae1aeccc0f3c..7d666adda0852f9c3a998ba92761ec870a9b9585 100644 (file)
@@ -13,10 +13,6 @@ Node
        .unref skip
 
 // Forward Upstream
-Json cheader_filename="json-glib/json-glib.h"
-Node
-       .get_value.value out
-BoxedDeserializeFunc skip=false
 boxed_register_serialize_func skip=false
 boxed_register_deserialize_func skip=false
 
@@ -25,9 +21,9 @@ gvariant_deserialize unowned=false nullable floating
 gvariant_deserialize_data unowned=false nullable floating
 
 Object.add_member replacement="Json.Object.set_member"
-Serializable cheader_filename="json-glib/json-glib.h,json-glib/json-gobject.h"
+Serializable
+       .*#virtual_method virtual
        .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"
+       .list_properties virtual
+construct_gobject replacement="Json.gobject_from_data"
+serialize_gobject replacement="Json.gobject_to_data"