Don't do the second lookup if the name was already canonical. (#171502,
authorMatthias Clasen <mclasen@redhat.com>
Sat, 26 Mar 2005 03:00:44 +0000 (03:00 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 26 Mar 2005 03:00:44 +0000 (03:00 +0000)
2005-03-25  Matthias Clasen  <mclasen@redhat.com>

* gparam.c (param_spec_ht_lookup): Don't do the second
lookup if the name was already canonical.  (#171502, Morten
Welinder)

gobject/ChangeLog
gobject/gparam.c

index 4f0d5e3d65d2f574782b6ad002c50b55e979c0dc..8b9636f52fad92248b096e4a18514ac20691d40c 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-25  Matthias Clasen  <mclasen@redhat.com>
+
+       * gparam.c (param_spec_ht_lookup): Don't do the second
+       lookup if the name was already canonical.  (#171502, Morten
+       Welinder)
+
 Tue Mar 22 14:15:23 2005  Manish Singh <yosh@gimp.org>
 
        * gparam.c (g_param_spec_internal): cast away any constness on
index b6732cb1ffd4b659257ba618f63489e7b2665b96..914bc123d0d49d0c8aff79825534de89055f9a1d 100644 (file)
@@ -739,7 +739,7 @@ param_spec_ht_lookup (GHashTable  *hash_table,
   else
     pspec = g_hash_table_lookup (hash_table, &key);
 
-  if (!pspec)
+  if (!pspec && !is_canonical (param_name))
     {
       /* try canonicalized form */
       key.name = g_strdup (param_name);