]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
json-glib-1.0: the get_root() methods return values are nullable.
authorEvan Nemerson <evan@coeus-group.com>
Mon, 25 Mar 2013 19:38:35 +0000 (12:38 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Wed, 27 Mar 2013 09:34:49 +0000 (02:34 -0700)
vapi/glib-2.0.vapi
vapi/json-glib-1.0.vapi
vapi/metadata/Json-1.0.metadata

index 199c904611fd64f94696aac2d27d78ea5409f75f..bae96e0e090608ed5cd053fad1a6312d1f69489f 100644 (file)
@@ -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")]
index 9f8cee68efe40d3fa8c3fc7cd5ee32e81176e0b4..384bbe15f0689af2d16e86630e84d42f6526676e 100644 (file)
@@ -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")]
index 67ae83027df4d3e2ff5834a03039199990a72eb0..73f391532dae73755c62280a8f1bc2e6fafe5ace 100644 (file)
@@ -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"