vala r870 - in trunk: . vapigen



Author: juergbi
Date: Sat Jan 19 16:49:32 2008
New Revision: 870
URL: http://svn.gnome.org/viewvc/vala?rev=870&view=rev

Log:
2008-01-19  Juerg Billeter  <j bitron ch>

	* vapigen/valagidlparser.vala: support hiding enums


Modified:
   trunk/ChangeLog
   trunk/vapigen/valagidlparser.vala

Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala	(original)
+++ trunk/vapigen/valagidlparser.vala	Sat Jan 19 16:49:32 2008
@@ -234,11 +234,17 @@
 				parse_boxed ((IdlNodeBoxed) node, ns, module);
 			} else if (node.type == IdlNodeTypeId.ENUM) {
 				var en = parse_enum ((IdlNodeEnum) node);
+				if (en == null) {
+					continue;
+				}
 				en.name = fix_type_name (en.name, ns);
 				ns.add_enum (en);
 				current_source_file.add_node (en);
 			} else if (node.type == IdlNodeTypeId.FLAGS) {
 				var en = parse_enum ((IdlNodeEnum) node);
+				if (en == null) {
+					continue;
+				}
 				en.name = fix_type_name (en.name, ns);
 				en.is_flags = true;
 				ns.add_enum (en);
@@ -719,6 +725,10 @@
 				var nv = attr.split ("=", 2);
 				if (nv[0] == "common_prefix") {
 					common_prefix = eval (nv[1]);
+				} else if (nv[0] == "hidden") {
+					if (eval (nv[1]) == "1") {
+						return null;
+					}
 				}
 			}
 		}



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