[vala/0.40] json-glib-1.0: Change abstract methods of Serializable to virtual



commit 4af8549d56a45d56aded5e0d84f096237f480f83
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Sep 2 21:35:00 2019 +0200

    json-glib-1.0: Change abstract methods of Serializable to virtual
    
    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         | 18 +++++++++---------
 vapi/metadata/Json-1.0.metadata | 14 +++++---------
 2 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi
index 45d23e27d..4a06d2a06 100644
--- a/vapi/json-glib-1.0.vapi
+++ b/vapi/json-glib-1.0.vapi
@@ -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")]
diff --git a/vapi/metadata/Json-1.0.metadata b/vapi/metadata/Json-1.0.metadata
index 79df8a07e..7d666adda 100644
--- a/vapi/metadata/Json-1.0.metadata
+++ b/vapi/metadata/Json-1.0.metadata
@@ -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"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]