perform an exact match on the two types instead of using
authorSven Neumann <sven@gimp.org>
Mon, 10 Dec 2001 22:21:50 +0000 (22:21 +0000)
committerSven Neumann <neo@src.gnome.org>
Mon, 10 Dec 2001 22:21:50 +0000 (22:21 +0000)
2001-12-10  Sven Neumann  <sven@gimp.org>

* gobject/gvalue.c (g_value_register_transform_func): perform an exact
match on the two types instead of using transform_func_lookup().

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gobject/gvalue.c

index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 006939d9b148925bd0838045596c48f71dfaead5..5bdf6139534910e8e32bfe296257add698b8bf28 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Sven Neumann  <sven@gimp.org>
+
+       * gobject/gvalue.c (g_value_register_transform_func): perform an exact
+       match on the two types instead of using transform_func_lookup().
+
 2001-12-09  Christopher Blizzard  <blizzard@redhat.com>
 
        * glib/gmessages.h: Add pragma that will prevent warnings when you
index 7fd36f78be8ff5bafb86a72be185b25700f0b1a1..c6853d115b9d786dbe878e0e3fb8c04211a539ca 100644 (file)
@@ -274,14 +274,17 @@ g_value_register_transform_func (GType           src_type,
   g_return_if_fail (G_TYPE_HAS_VALUE_TABLE (dest_type));
   g_return_if_fail (transform_func != NULL);
 
-  if (transform_func_lookup (src_type, dest_type))
+  entry.src_type = src_type;
+  entry.dest_type = dest_type;
+  
+  if (g_bsearch_array_lookup (&transform_array, &entry))
     g_warning ("reregistering value transformation function (%p) for `%s' to `%s'",
               transform_func,
               g_type_name (src_type),
               g_type_name (dest_type));
-  entry.src_type = src_type;
-  entry.dest_type = dest_type;
+
   entry.func = transform_func;
+
   g_bsearch_array_insert (&transform_array, &entry, TRUE);
 }