[glib] Bug 623401 - schema compiler: process enums first



commit 7a44a2d223f3ad8c6e142b94725ab55cf3f84173
Author: Ryan Lortie <desrt desrt ca>
Date:   Fri Jul 2 11:11:45 2010 -0400

    Bug 623401 - schema compiler: process enums first
    
    Process *.enum.xml before any *.gschema.xml files to ensure that all
    enums have been defined.

 gio/gschema-compile.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gio/gschema-compile.c b/gio/gschema-compile.c
index d7ae5f8..33d6ea4 100644
--- a/gio/gschema-compile.c
+++ b/gio/gschema-compile.c
@@ -1601,8 +1601,15 @@ compare_strings (gconstpointer a,
 {
   gchar *one = *(gchar **) a;
   gchar *two = *(gchar **) b;
+  gint cmp;
 
-  return strcmp (one, two);
+  cmp = g_str_has_suffix (two, ".enums.xml") -
+        g_str_has_suffix (one, ".enums.xml");
+
+  if (!cmp)
+    cmp = strcmp (one, two);
+
+  return cmp;
 }
 
 int



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