[vala] json-glib-1.0: the get_root() methods return values are nullable.



commit 8c6522886a22de31f274fedd88c61b32c3db4b97
Author: Evan Nemerson <evan coeus-group com>
Date:   Mon Mar 25 12:38:35 2013 -0700

    json-glib-1.0: the get_root() methods return values are nullable.

 vapi/glib-2.0.vapi              |   10 ++++++++++
 vapi/json-glib-1.0.vapi         |   10 +++++-----
 vapi/metadata/Json-1.0.metadata |    1 +
 3 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 199c904..bae96e0 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -460,6 +460,11 @@ public struct uint16 {
        [CCode (cname = "GUINT16_FROM_LE")]
        public static uint16 from_little_endian (uint16 val);
 
+       [CCode (cname = "g_htons")]
+       public static uint16 to_network (uint16 val);
+       [CCode (cname = "g_ntohs")]
+       public static uint16 from_network (uint16 val);
+
        [CCode (cname = "GUINT16_SWAP_BE_PDP")]
        public uint16 swap_big_endian_pdp ();
        [CCode (cname = "GUINT16_SWAP_LE_BE")]
@@ -539,6 +544,11 @@ public struct uint32 {
        [CCode (cname = "GUINT32_FROM_LE")]
        public static uint32 from_little_endian (uint32 val);
 
+       [CCode (cname = "g_htonl")]
+       public static uint32 to_network (uint32 val);
+       [CCode (cname = "g_ntohl")]
+       public static uint32 from_network (uint32 val);
+
        [CCode (cname = "GUINT32_SWAP_BE_PDP")]
        public uint32 swap_big_endian_pdp ();
        [CCode (cname = "GUINT32_SWAP_LE_BE")]
diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi
index 9f8cee6..384bbe1 100644
--- a/vapi/json-glib-1.0.vapi
+++ b/vapi/json-glib-1.0.vapi
@@ -47,7 +47,7 @@ namespace Json {
                public unowned Json.Builder begin_object ();
                public unowned Json.Builder end_array ();
                public unowned Json.Builder end_object ();
-               public Json.Node get_root ();
+               public Json.Node? get_root ();
                public void reset ();
                public unowned Json.Builder set_member_name (string member_name);
        }
@@ -58,7 +58,7 @@ namespace Json {
                public uint get_indent ();
                public unichar get_indent_char ();
                public bool get_pretty ();
-               public unowned Json.Node get_root ();
+               public unowned Json.Node? get_root ();
                public void set_indent (uint indent_level);
                public void set_indent_char (unichar indent_char);
                public void set_pretty (bool is_pretty);
@@ -153,7 +153,7 @@ namespace Json {
                public static GLib.Quark error_quark ();
                public uint get_current_line ();
                public uint get_current_pos ();
-               public unowned Json.Node get_root ();
+               public unowned Json.Node? get_root ();
                public bool has_assignment (out unowned string variable_name);
                public bool load_from_data (string data, ssize_t length = -1) throws GLib.Error;
                public bool load_from_file (string filename) throws GLib.Error;
@@ -292,9 +292,9 @@ namespace Json {
        [CCode (cheader_filename = "json-glib/json-glib.h")]
        public static string gobject_to_data (GLib.Object gobject, out size_t length);
        [CCode (cheader_filename = "json-glib/json-glib.h")]
-       public static GLib.Variant gvariant_deserialize (Json.Node json_node, string? signature) throws 
GLib.Error;
+       public static unowned GLib.Variant gvariant_deserialize (Json.Node json_node, string? signature) 
throws GLib.Error;
        [CCode (cheader_filename = "json-glib/json-glib.h")]
-       public static GLib.Variant gvariant_deserialize_data (string json, ssize_t length, string? signature) 
throws GLib.Error;
+       public static unowned GLib.Variant gvariant_deserialize_data (string json, ssize_t length, string? 
signature) throws GLib.Error;
        [CCode (cheader_filename = "json-glib/json-glib.h")]
        public static Json.Node gvariant_serialize (GLib.Variant variant);
        [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 67ae830..73f3915 100644
--- a/vapi/metadata/Json-1.0.metadata
+++ b/vapi/metadata/Json-1.0.metadata
@@ -3,6 +3,7 @@
 Parser.load_from_data.length default=-1
 gobject_from_data.length default=-1
 Array.sized_new name="sized"
+*.get_root nullable
 
 // Forward Upstream
 Json cheader_filename="json-glib/json-glib.h"


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