[libpeas] Fix prerequisites_sort() in GJS and Seed



commit f5c9b87a94bb01ad396b7ce13fd41a341a68e85c
Author: Garrett Regier <garrettregier gmail com>
Date:   Thu Dec 8 18:26:20 2011 -0800

    Fix prerequisites_sort() in GJS and Seed
    
    Otherwise the order in the array determines if the extension
    can be created or not.

 loaders/gjs/peas-plugin-loader-gjs.c   |    5 +----
 loaders/seed/peas-plugin-loader-seed.c |    5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/loaders/gjs/peas-plugin-loader-gjs.c b/loaders/gjs/peas-plugin-loader-gjs.c
index 34a28be..b120598 100644
--- a/loaders/gjs/peas-plugin-loader-gjs.c
+++ b/loaders/gjs/peas-plugin-loader-gjs.c
@@ -148,13 +148,10 @@ static gint
 prerequisites_sort (GType *a,
                     GType *b)
 {
-  if (g_type_is_a (*a, *b))
-    return 1;
-
   if (g_type_is_a (*b, *a))
     return -1;
 
-  return 0;
+  return 1;
 }
 
 static PeasExtension *
diff --git a/loaders/seed/peas-plugin-loader-seed.c b/loaders/seed/peas-plugin-loader-seed.c
index c900569..668b639 100644
--- a/loaders/seed/peas-plugin-loader-seed.c
+++ b/loaders/seed/peas-plugin-loader-seed.c
@@ -142,13 +142,10 @@ static gint
 prerequisites_sort (GType *a,
                     GType *b)
 {
-  if (g_type_is_a (*a, *b))
-    return 1;
-
   if (g_type_is_a (*b, *a))
     return -1;
 
-  return 0;
+  return 1;
 }
 
 static PeasExtension *



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