vala r1514 - in trunk: . vala



Author: juergbi
Date: Sat May 31 11:29:54 2008
New Revision: 1514
URL: http://svn.gnome.org/viewvc/vala?rev=1514&view=rev

Log:
2008-05-31  JÃrg Billeter  <j bitron ch>

	* vala/valaclass.vala:
	* vala/valainterface.vala:

	Emit nested enums before structs,
	based on patch by Jaap A. Haitsma, fixes bug 530063


Modified:
   trunk/ChangeLog
   trunk/vala/valaclass.vala
   trunk/vala/valainterface.vala

Modified: trunk/vala/valaclass.vala
==============================================================================
--- trunk/vala/valaclass.vala	(original)
+++ trunk/vala/valaclass.vala	Sat May 31 11:29:54 2008
@@ -388,7 +388,12 @@
 		foreach (TypeParameter p in type_parameters) {
 			p.accept (visitor);
 		}
-		
+
+		/* process enums first to avoid order problems in C code */
+		foreach (Enum en in enums) {
+			en.accept (visitor);
+		}
+
 		foreach (Field f in fields) {
 			f.accept (visitor);
 		}
@@ -433,10 +438,6 @@
 			st.accept (visitor);
 		}
 
-		foreach (Enum en in enums) {
-			en.accept (visitor);
-		}
-
 		foreach (Delegate d in delegates) {
 			d.accept (visitor);
 		}

Modified: trunk/vala/valainterface.vala
==============================================================================
--- trunk/vala/valainterface.vala	(original)
+++ trunk/vala/valainterface.vala	Sat May 31 11:29:54 2008
@@ -329,7 +329,12 @@
 		foreach (TypeParameter p in type_parameters) {
 			p.accept (visitor);
 		}
-		
+
+		/* process enums first to avoid order problems in C code */
+		foreach (Enum en in enums) {
+			en.accept (visitor);
+		}
+
 		foreach (Method m in methods) {
 			m.accept (visitor);
 		}
@@ -354,10 +359,6 @@
 			st.accept (visitor);
 		}
 
-		foreach (Enum en in enums) {
-			en.accept (visitor);
-		}
-
 		foreach (Delegate d in delegates) {
 			d.accept (visitor);
 		}



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