[vala] Fix default free function for classes



commit a90cf0a8e993501d708a070da3a870fe99deff00
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri Apr 22 18:23:34 2011 +0200

    Fix default free function for classes
    
    Fixes bug 642362.

 vala/valaclass.vala           |    6 +++---
 vapi/gstreamer-base-0.10.vapi |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index f9ec4fa..2550058 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -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;
diff --git a/vapi/gstreamer-base-0.10.vapi b/vapi/gstreamer-base-0.10.vapi
index 4195244..e2ffc54 100644
--- a/vapi/gstreamer-base-0.10.vapi
+++ b/vapi/gstreamer-base-0.10.vapi
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]