From: Jürg Billeter Date: Tue, 16 Dec 2008 09:10:40 +0000 (+0000) Subject: Various ownership fixes, patch by Evan Nemerson, fixes bug 547450 X-Git-Tag: VALA_0_5_3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb48ecc04ba45908722a251b3c3def97560f9db7;p=thirdparty%2Fvala.git Various ownership fixes, patch by Evan Nemerson, fixes bug 547450 2008-12-16 Jürg Billeter * 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 --- diff --git a/ChangeLog b/ChangeLog index aeb09ca48..fb7c893f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-16 Jürg Billeter + + * 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 * vapi/glib-2.0.vapi: diff --git a/vapi/json-glib-1.0.vapi b/vapi/json-glib-1.0.vapi index 91f781b6e..1477a1043 100644 --- a/vapi/json-glib-1.0.vapi +++ b/vapi/json-glib-1.0.vapi @@ -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 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 get_members (); public uint get_size (); - public weak GLib.List get_values (); + public GLib.List 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 index 000000000..42b996154 --- /dev/null +++ b/vapi/packages/json-glib-1.0/json-glib-1.0-custom.vala @@ -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 get_members (); + public GLib.List get_values (); + } + + [Compact] + public class Array { + public GLib.List get_elements (); + } +} diff --git a/vapi/packages/json-glib-1.0/json-glib-1.0.metadata b/vapi/packages/json-glib-1.0/json-glib-1.0.metadata index 922c8e778..303a37979 100644 --- a/vapi/packages/json-glib-1.0/json-glib-1.0.metadata +++ b/vapi/packages/json-glib-1.0/json-glib-1.0.metadata @@ -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"