[libpeas] Add get_type_from_name fast path for GLib



commit 40207b0ece4a6be4fda32a07f4c1498387d04cd1
Author: Garrett Regier <garrettregier gmail com>
Date:   Thu Dec 8 18:25:07 2011 -0800

    Add get_type_from_name fast path for GLib

 libpeas/peas-introspection.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libpeas/peas-introspection.c b/libpeas/peas-introspection.c
index 5aa8c6b..75401a3 100644
--- a/libpeas/peas-introspection.c
+++ b/libpeas/peas-introspection.c
@@ -354,7 +354,6 @@ peas_gi_get_type_from_name (const gchar *type_name)
   if (the_type != G_TYPE_INVALID)
     return the_type;
 
-
   ns = g_irepository_get_loaded_namespaces (NULL);
 
   /* Attempt to find it via naming conventions */
@@ -362,8 +361,10 @@ peas_gi_get_type_from_name (const gchar *type_name)
     {
       gsize len;
 
-      /* Allow GObject and Gio Interfaces to use the fast path */
-      if (g_strcmp0 (ns[i], "GObject") == 0 || g_strcmp0 (ns[i], "Gio") == 0)
+      /* Allow GLib, GObject and Gio Interfaces to use the fast path */
+      if (g_strcmp0 (ns[i], "GLib") == 0 ||
+          g_strcmp0 (ns[i], "GObject") == 0 ||
+          g_strcmp0 (ns[i], "Gio") == 0)
         len = 1;
       else
         len = strlen (ns[i]);



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