]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gstreamer-0.10: Let all ref methods return an unowned value
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 24 Jun 2010 20:14:13 +0000 (22:14 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 24 Jun 2010 20:14:13 +0000 (22:14 +0200)
Otherwise the return value will immediately be unreffed if
it isn't stored somewhere, making the ref a no-op.

vapi/gstreamer-0.10.vapi
vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala

index fe2f49463b153dc17065d9349652860795df7c79..c840e16d3bb1fb84dbe904795884419e47e48f29 100644 (file)
@@ -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)]
index 36de20e847413099bc7da04f4a4ff92990447023..48141b50c8a3a741b5782e821f5229a01f552a3d 100644 (file)
@@ -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 ();
        }