[valadoc] doclets/gtkdoc: Work around crash in scanobj (free, invalid next size)



commit 26d6e517a6964a5de30f28802066f0822d9c31ea
Author: Florian Brosch <flo brosch gmail com>
Date:   Thu Feb 24 02:22:08 2011 +0100

    doclets/gtkdoc: Work around crash in scanobj (free, invalid next size)

 src/doclets/gtkdoc/doclet.vala |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/doclets/gtkdoc/doclet.vala b/src/doclets/gtkdoc/doclet.vala
index 8b6e792..fc9b30f 100644
--- a/src/doclets/gtkdoc/doclet.vala
+++ b/src/doclets/gtkdoc/doclet.vala
@@ -249,18 +249,27 @@ public class Gtkdoc.Director : Valadoc.Doclet, Object {
 
 		var library = realpath (Config.library_filename);
 
-		string[] pc = { "pkg-config" };
+		string[] pc = new string[] { "pkg-config" };
+
 		foreach (var package in tree.get_package_list()) {
 			if (package.is_package && package_exists (package.name, reporter)) {
 				pc += package.name;
 			}
 		}
 
-		var pc_cflags = pc;
+		//TODO: find out why var pc_cflags = pc; fails (free, invalid next size)
+		string[] pc_cflags = new string[] {};
+		foreach (var name in pc) {
+			pc_cflags += name;
+		}
 		pc_cflags += "--cflags";
-		var pc_libs = pc;
+
+		string[] pc_libs = new string[] {};
+		foreach (var name in pc) {
+			pc_libs += name;
+		}
 		pc_libs += "--libs";
-	
+
 		try {
 			string stderr;
 			int status;



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