[vala] vapigen: fix changing the type_name of an array field via metadata



commit 1986158eade1ae778b714a5f0f6d906d0ebc33b2
Author: Evan Nemerson <evan coeus-group com>
Date:   Fri Mar 5 13:51:00 2010 -0800

    vapigen: fix changing the type_name of an array field via metadata

 vapigen/valagidlparser.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index e971ac0..47e1fea 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -1995,7 +1995,12 @@ public class Vala.GIdlParser : CodeVisitor {
 						type.value_owned = true;
 					}
 				} else if (nv[0] == "type_name") {
-					((UnresolvedType) type).unresolved_symbol = new UnresolvedSymbol (null, eval (nv[1]));
+					var unresolved_sym = new UnresolvedSymbol (null, eval (nv[1]));
+					if (type is ArrayType) {
+						((UnresolvedType) ((ArrayType) type).element_type).unresolved_symbol = unresolved_sym;
+					} else {
+						((UnresolvedType) type).unresolved_symbol = unresolved_sym;
+					}
 				} else if (nv[0] == "type_arguments") {
 					var type_args = eval (nv[1]).split (",");
 					foreach (string type_arg in type_args) {



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