[vala] vapigen: fix handling of type_name on fields



commit 95f0705a3b98e7259e21fc66860da9b0110107ce
Author: Evan Nemerson <evan coeus-group com>
Date:   Sat Oct 23 00:56:09 2010 -0700

    vapigen: fix handling of type_name on fields

 vapigen/valagidlparser.vala |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index 438a8c7..2225867 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2434,16 +2434,7 @@ public class Vala.GIdlParser : CodeVisitor {
 						type.value_owned = true;
 					}
 				} else if (nv[0] == "type_name") {
-					if (eval (nv[1]) == "pointer") {
-						type = new PointerType (new VoidType ());
-					} else {
-						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;
-						}
-					}
+					type = get_type_from_string (eval (nv[1]));
 				} 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]