[vala] gidlparser: Add no_delegate_target metadata for fields



commit d9fe12dd7ea4479a1d23aec46a130a347e2dc421
Author: Luca Bruno <lucabru src gnome org>
Date:   Sun Jun 26 18:59:01 2011 +0200

    gidlparser: Add no_delegate_target metadata for fields

 vapigen/valagidlparser.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 316e420..137bf2c 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2597,6 +2597,7 @@ public class Vala.GIdlParser : CodeVisitor {
 		string deprecated_since = null;
 		string replacement = null;
 		bool experimental = false;
+		bool no_delegate_target = false;
 
 		var attributes = get_attributes ("%s.%s".printf (current_data_type.get_cname (), node.name));
 		if (attributes != null) {
@@ -2646,6 +2647,10 @@ public class Vala.GIdlParser : CodeVisitor {
 					array_length_cname = eval (nv[1]);
 				} else if (nv[0] == "array_length_type") {
 					array_length_type = eval (nv[1]);
+				} else if (nv[0] == "no_delegate_target") {
+					if (eval (nv[1]) == "1") {
+						no_delegate_target = true;
+					}
 				} else if (nv[0] == "experimental") {
 					if (eval (nv[1]) == "1") {
 						experimental = true;
@@ -2714,6 +2719,10 @@ public class Vala.GIdlParser : CodeVisitor {
 			field.no_array_length = true;
 		}
 
+		if (no_delegate_target) {
+			field.no_delegate_target = true;
+		}
+
 		return field;
 	}
 



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