[vala/switch-to-gir] girparser: Handle utf8 with ctype char** as string[]?



commit 82126007e508e6a9f2aa5f31cc4a1d84288d21b6
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Nov 9 11:54:13 2010 +0100

    girparser: Handle utf8 with ctype char** as string[]?

 vala/valagirparser.vala                |    6 ++++++
 vapi/packages/gio-2.0/Gio-2.0.metadata |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 8dc98d2..eb8b19f 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1748,6 +1748,12 @@ public class Vala.GirParser : CodeVisitor {
 			type.add_type_argument (element_type);
 		}
 
+		// string[]?
+		if (type.to_qualified_string () == "string" && ctype == "char**") {
+			type = new ArrayType (type, 1, null);
+			type.nullable = true;
+		}
+
 		end_element (is_array ? "array" : "type");
 		return type;
 	}
diff --git a/vapi/packages/gio-2.0/Gio-2.0.metadata b/vapi/packages/gio-2.0/Gio-2.0.metadata
index bbc6ea7..fd3db28 100644
--- a/vapi/packages/gio-2.0/Gio-2.0.metadata
+++ b/vapi/packages/gio-2.0/Gio-2.0.metadata
@@ -1,5 +1,6 @@
 Gio name="GLib"
 content_type_* parent="GLib.ContentType" name="content_type_(.*)"
+Application.run.argv array_length_pos=0
 
 // Possible GI bugs
 FileIOStream.seek.cancellable nullable



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