]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Various ownership fixes, patch by Evan Nemerson, fixes bug 547450
authorJürg Billeter <j@bitron.ch>
Tue, 16 Dec 2008 09:10:40 +0000 (09:10 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 16 Dec 2008 09:10:40 +0000 (09:10 +0000)
2008-12-16  Jürg Billeter  <j@bitron.ch>

* vapi/packages/json-glib-1.0/:

Various ownership fixes, patch by Evan Nemerson, fixes bug 547450

* vapi/json-glib-1.0.vapi: regenerated

svn path=/trunk/; revision=2178

ChangeLog
vapi/json-glib-1.0.vapi
vapi/packages/json-glib-1.0/json-glib-1.0-custom.vala [new file with mode: 0644]
vapi/packages/json-glib-1.0/json-glib-1.0.metadata

index aeb09ca48e069ababa68c5b396ad31bb5f29ca5a..fb7c893f4940e8a39fb35d9a13a3cfd03f260457 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-16  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/packages/json-glib-1.0/:
+
+       Various ownership fixes, patch by Evan Nemerson, fixes bug 547450
+
+       * vapi/json-glib-1.0.vapi: regenerated
+
 2008-12-16  Jürg Billeter  <j@bitron.ch>
 
        * vapi/glib-2.0.vapi:
index 91f781b6efeaf4375ea5a2bf0558273f7115ae94..1477a10436037c5000f1f4981088e6ec50db5bf6 100644 (file)
@@ -5,9 +5,9 @@ namespace Json {
        [Compact]
        [CCode (ref_function = "json_array_ref", unref_function = "json_array_unref", cheader_filename = "json-glib/json-glib.h")]
        public class Array {
-               public void add_element (Json.Node node);
+               public void add_element (Json.Node# node);
                public weak Json.Node get_element (uint index_);
-               public weak GLib.List get_elements ();
+               public GLib.List<weak Json.Node> get_elements ();
                public uint get_length ();
                [CCode (has_construct_function = false)]
                public Array ();
@@ -19,7 +19,7 @@ namespace Json {
                [CCode (has_construct_function = false)]
                public Generator ();
                public void set_root (Json.Node node);
-               public string to_data (out ulong length);
+               public string to_data (out size_t length);
                public bool to_file (string filename) throws GLib.Error;
                [NoAccessorMethod]
                public uint indent { get; set; }
@@ -34,10 +34,10 @@ namespace Json {
                public void* data;
                public weak Json.Node parent;
                public Json.NodeType type;
-               public weak Json.Node copy ();
-               public weak Json.Array dup_array ();
-               public weak Json.Object dup_object ();
-               public weak string dup_string ();
+               public Json.Node copy ();
+               public Json.Array dup_array ();
+               public Json.Object dup_object ();
+               public string dup_string ();
                public weak Json.Array get_array ();
                public bool get_boolean ();
                public double get_double ();
@@ -56,18 +56,18 @@ namespace Json {
                public void set_object (Json.Object object);
                public void set_string (string value);
                public void set_value (GLib.Value value);
-               public void take_array (Json.Array array);
-               public void take_object (Json.Object object);
+               public void take_array (Json.Array# array);
+               public void take_object (Json.Object# object);
                public weak string type_name ();
        }
        [Compact]
        [CCode (ref_function = "json_object_ref", unref_function = "json_object_unref", cheader_filename = "json-glib/json-glib.h")]
        public class Object {
-               public void add_member (string member_name, Json.Node node);
+               public void add_member (string member_name, Json.Node# node);
                public weak Json.Node get_member (string member_name);
-               public weak GLib.List get_members ();
+               public GLib.List<weak string> get_members ();
                public uint get_size ();
-               public weak GLib.List get_values ();
+               public GLib.List<weak Json.Node> get_values ();
                public bool has_member (string member_name);
                [CCode (has_construct_function = false)]
                public Object ();
@@ -80,7 +80,7 @@ namespace Json {
                public uint get_current_pos ();
                public weak Json.Node get_root ();
                public bool has_assignment (out weak string variable_name);
-               public bool load_from_data (string data, ulong length) throws GLib.Error;
+               public bool load_from_data (string data, size_t length) throws GLib.Error;
                public bool load_from_file (string filename) throws GLib.Error;
                [CCode (has_construct_function = false)]
                public Parser ();
@@ -131,7 +131,7 @@ namespace Json {
        [CCode (cheader_filename = "json-glib/json-glib.h")]
        public const string VERSION_S;
        [CCode (cheader_filename = "json-glib/json-glib.h")]
-       public static GLib.Object construct_gobject (GLib.Type gtype, string data, ulong length) throws GLib.Error;
+       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")]
-       public static string serialize_gobject (GLib.Object gobject, out ulong length);
+       public static string serialize_gobject (GLib.Object gobject, out size_t length);
 }
diff --git a/vapi/packages/json-glib-1.0/json-glib-1.0-custom.vala b/vapi/packages/json-glib-1.0/json-glib-1.0-custom.vala
new file mode 100644 (file)
index 0000000..42b9961
--- /dev/null
@@ -0,0 +1,31 @@
+/* json-glib-1.0.vala
+ *
+ * Copyright (C) 2008  Evan Nemerson
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+namespace Json {
+       [Compact]
+       public class Object {
+               public GLib.List<weak string> get_members ();
+               public GLib.List<weak Node> get_values ();
+       }
+
+       [Compact]
+       public class Array {
+               public GLib.List<weak Node> get_elements ();
+       }
+}
index 922c8e778f2351f195b83399f0ef8f39d39181b2..303a37979ca30573db459429d2b22365d4a38f53 100644 (file)
@@ -6,4 +6,15 @@ json_serializable_serialize_property transfer_ownership="1"
 json_construct_gobject transfer_ownership="1"
 json_serialize_gobject transfer_ownership="1"
 json_serialize_gobject.length is_out="1"
+json_array_add_element.node transfer_ownership="1"
+json_array_get_elements hidden="1"
+json_node_copy transfer_ownership="1"
+json_node_dup_array transfer_ownership="1"
+json_node_dup_object transfer_ownership="1"
+json_node_dup_string transfer_ownership="1"
+json_node_take_array.array transfer_ownership="1"
+json_node_take_object.object transfer_ownership="1"
+json_object_get_members hidden="1"
+json_object_get_values hidden="1"
+json_object_add_member.node transfer_ownership="1"