From: Sebastian Dröge Date: Thu, 24 Jun 2010 20:14:13 +0000 (+0200) Subject: gstreamer-0.10: Let all ref methods return an unowned value X-Git-Tag: 0.9.3~96 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5044fb845e282c3095184aedf7dbef5502b16590;p=thirdparty%2Fvala.git gstreamer-0.10: Let all ref methods return an unowned value Otherwise the return value will immediately be unreffed if it isn't stored somewhere, making the ref a no-op. --- diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi index fe2f49463..c840e16d3 100644 --- a/vapi/gstreamer-0.10.vapi +++ b/vapi/gstreamer-0.10.vapi @@ -105,7 +105,7 @@ namespace Gst { public bool offset_end_is_valid (); [CCode (cname = "GST_BUFFER_OFFSET_IS_VALID")] public bool offset_is_valid (); - public Gst.Buffer @ref (); + public unowned Gst.Buffer @ref (); public static void replace (ref Gst.Buffer? oldobj, Gst.Buffer? newobj); public void set_caps (Gst.Caps caps); public Gst.Buffer span (uint32 offset, Gst.Buffer buf2, uint32 len); @@ -126,7 +126,7 @@ namespace Gst { [ReturnsModifiedPointer] public void make_writable (); public uint n_groups (); - public Gst.BufferList @ref (); + public unowned Gst.BufferList @ref (); public void unref (); } [Compact] @@ -209,7 +209,7 @@ namespace Gst { public void merge (owned Gst.Caps caps2); public void merge_structure (owned Gst.Structure structure); public Gst.Caps normalize (); - public Gst.Caps @ref (); + public unowned Gst.Caps @ref (); public void remove_structure (uint idx); public static void replace (ref Gst.Caps? oldobj, Gst.Caps? newobj); public void* save_thyself (void* parent); @@ -505,7 +505,7 @@ namespace Gst { public void parse_tag (out unowned Gst.TagList taglist); [CCode (has_construct_function = false)] public Event.qos (double proportion, Gst.ClockTimeDiff diff, Gst.ClockTime timestamp); - public Gst.Event @ref (); + public unowned Gst.Event @ref (); public static void replace (ref Gst.Event? oldobj, Gst.Event? newobj); [CCode (has_construct_function = false)] public Event.seek (double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, int64 start, Gst.SeekType stop_type, int64 stop); @@ -682,7 +682,7 @@ namespace Gst { public void parse_tag (out Gst.TagList tag_list); public void parse_tag_full (out unowned Gst.Pad pad, out unowned Gst.TagList tag_list); public void parse_warning (out GLib.Error gerror, out string? debug); - public Gst.Message @ref (); + public unowned Gst.Message @ref (); [CCode (has_construct_function = false)] public Message.request_state (Gst.Object src, Gst.State state); [CCode (has_construct_function = false)] @@ -729,7 +729,7 @@ namespace Gst { public bool is_writable (); [ReturnsModifiedPointer] public void make_writable (); - public Gst.MiniObject @ref (); + public unowned Gst.MiniObject @ref (); public static void replace (ref Gst.MiniObject? oldobj, Gst.MiniObject? newobj); public void unref (); } @@ -757,7 +757,7 @@ namespace Gst { public bool is_disposing (); [CCode (cname = "GST_OBJECT_IS_FLOATING")] public bool is_floating (); - public Gst.Object @ref (); + public unowned Gst.Object @ref (); public void ref_sink (); public static void replace (ref Gst.Object? oldobj, Gst.Object? newobj); public virtual void restore_thyself (void* self); @@ -1056,7 +1056,7 @@ namespace Gst { public void parse_uri (out string uri); [CCode (has_construct_function = false)] public Query.position (Gst.Format format); - public Gst.Query @ref (); + public unowned Gst.Query @ref (); [CCode (has_construct_function = false)] public Query.seeking (Gst.Format format); [CCode (has_construct_function = false)] diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala index 36de20e84..48141b50c 100644 --- a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala +++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala @@ -42,7 +42,7 @@ namespace Gst { [CCode (ref_function = "gst_event_ref", unref_function = "gst_event_unref")] public class Event : MiniObject { - public Event @ref (); + public unowned Event @ref (); public void unref (); public static void replace (ref Event? oldobj, Event? newobj); public Event copy (); @@ -131,7 +131,7 @@ namespace Gst { [CCode (ref_function = "gst_object_ref", unref_function = "gst_object_unref", ref_sink_function = "gst_object_ref_sink")] public abstract class Object { - public Gst.Object @ref (); + public unowned Gst.Object @ref (); public void unref (); public void sink (); public void ref_sink (); @@ -181,7 +181,7 @@ namespace Gst { [ReturnsModifiedPointer] public void join (owned Buffer buf2); - public Buffer @ref (); + public unowned Buffer @ref (); public void unref (); public static void replace (ref Buffer? oldobj, Buffer? newobj); public Buffer copy (); @@ -191,7 +191,7 @@ namespace Gst { public class BufferList : Gst.MiniObject { [ReturnsModifiedPointer] public void make_writable (); - public BufferList @ref (); + public unowned BufferList @ref (); public void unref (); public BufferList copy (); } @@ -269,7 +269,7 @@ namespace Gst { public delegate bool DataProbeCallback (Gst.Pad pad, Gst.MiniObject data); public class Caps { - public Caps @ref (); + public unowned Caps @ref (); public void unref (); [ReturnsModifiedPointer] @@ -285,7 +285,7 @@ namespace Gst { [ReturnsModifiedPointer] public void make_writable (); - public MiniObject @ref (); + public unowned MiniObject @ref (); public void unref (); public virtual MiniObject copy (); public virtual void finalize (); @@ -303,7 +303,7 @@ namespace Gst { public class Message : MiniObject { [ReturnsModifiedPointer] public void make_writable (); - public Message @ref (); + public unowned Message @ref (); public void unref (); public Message copy (); @@ -321,7 +321,7 @@ namespace Gst { public class Query : MiniObject { [ReturnsModifiedPointer] public void make_writable (); - public Query @ref (); + public unowned Query @ref (); public void unref (); public Query copy (); }