[vala] girparser: Allow specifying whether a boxed type is a struct



commit 9898d9d1b1e0ac22d11350afc3bcb66341266e7f
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri Apr 22 10:54:43 2011 +0200

    girparser: Allow specifying whether a boxed type is a struct

 vala/valagirparser.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index fadc59a..bde8186 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -66,7 +66,8 @@ public class Vala.GirParser : CodeVisitor {
 		VFUNC_NAME,
 		VIRTUAL,
 		ABSTRACT,
-		SCOPE;
+		SCOPE,
+		STRUCT;
 
 		public static ArgumentType? from_string (string name) {
 			var enum_class = (EnumClass) typeof(ArgumentType).class_ref ();
@@ -1536,7 +1537,7 @@ public class Vala.GirParser : CodeVisitor {
 			} else if (reader.name == "callback") {
 				add_symbol_info (parse_callback ());
 			} else if (reader.name == "record") {
-				if (reader.get_attribute ("glib:get-type") != null) {
+				if (reader.get_attribute ("glib:get-type") != null && !metadata.get_bool (ArgumentType.STRUCT)) {
 					add_symbol_info (parse_boxed ("record"));
 				} else {
 					if (!reader.get_attribute ("name").has_suffix ("Private")) {



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