]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix default free function for classes
authorLuca Bruno <lucabru@src.gnome.org>
Fri, 22 Apr 2011 16:23:34 +0000 (18:23 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 29 May 2011 09:04:09 +0000 (11:04 +0200)
Fixes bug 642362.

vala/valaclass.vala
vapi/gstreamer-base-0.10.vapi

index f9ec4fab97828528b7713fde7accf5a578601e7d..25500589955da66a79875d7af528a66d4a0bbbbb 100644 (file)
@@ -923,14 +923,14 @@ public class Vala.Class : ObjectTypeSymbol {
        }
 
        public string get_default_free_function () {
+               if (base_class != null) {
+                       return base_class.get_free_function ();
+               }
                return get_lower_case_cprefix () + "free";
        }
 
        public override string? get_free_function () {
                if (free_function == null) {
-                       if (base_class != null) {
-                               return base_class.get_free_function ();
-                       }
                        free_function = get_default_free_function ();
                }
                return free_function;
index 4195244414fff3cb00bbf660a4018cc9d6a9c44c..e2ffc544feaa138422b7fd924a6f659bb69606b7 100644 (file)
@@ -344,7 +344,7 @@ namespace Gst {
                public bool skip_string_utf8 ();
        }
        [Compact]
-       [CCode (cheader_filename = "gst/base/gstbytewriter.h")]
+       [CCode (free_function = "gst_byte_writer_free", cheader_filename = "gst/base/gstbytewriter.h")]
        public class ByteWriter : Gst.ByteReader {
                public uint alloc_size;
                public bool fixed;