[vala] Fix freeing GLib.PtrArray objects



commit 2180c13ac2d4c3be766e480e012bd9c721d98bd8
Author: Jürg Billeter <j bitron ch>
Date:   Sun Mar 29 08:56:00 2009 +0200

    Fix freeing GLib.PtrArray objects
---
 gobject/valaccodebasemodule.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gobject/valaccodebasemodule.vala b/gobject/valaccodebasemodule.vala
index 0b05134..3588ef1 100644
--- a/gobject/valaccodebasemodule.vala
+++ b/gobject/valaccodebasemodule.vala
@@ -114,6 +114,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 	public TypeSymbol gstringbuilder_type;
 	public TypeSymbol garray_type;
 	public TypeSymbol gbytearray_type;
+	public TypeSymbol gptrarray_type;
 	public DataType gquark_type;
 	public Struct gvalue_type;
 	public Struct mutex_type;
@@ -614,6 +615,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 		gstringbuilder_type = (TypeSymbol) glib_ns.scope.lookup ("StringBuilder");
 		garray_type = (TypeSymbol) glib_ns.scope.lookup ("Array");
 		gbytearray_type = (TypeSymbol) glib_ns.scope.lookup ("ByteArray");
+		gptrarray_type = (TypeSymbol) glib_ns.scope.lookup ("PtrArray");
 
 		gquark_type = new IntegerType ((Struct) glib_ns.scope.lookup ("Quark"));
 		gvalue_type = (Struct) glib_ns.scope.lookup ("Value");
@@ -1902,7 +1904,9 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 		var ccomma = new CCodeCommaExpression ();
 
 		if (type.data_type == gstringbuilder_type
-		     || type.data_type == garray_type || type.data_type == gbytearray_type) {
+		     || type.data_type == garray_type
+		     || type.data_type == gbytearray_type
+		     || type.data_type == gptrarray_type) {
 			ccall.add_argument (new CCodeConstant ("TRUE"));
 		} else if (type is ArrayType) {
 			var array_type = (ArrayType) type;



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