Bug 536158 – also bump GHashTable version when a node is removed via
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 10 Jun 2008 17:03:15 +0000 (17:03 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 10 Jun 2008 17:03:15 +0000 (17:03 +0000)
        g_hash_table_iter_remove()/g_hash_table_iter_steal()

        * glib/ghash.c (iter_remove_or_steal): Bump the hash table
        version. Patch by Jean-Yves Lefort

svn path=/trunk/; revision=6993

ChangeLog
glib/ghash.c

index 5c73df3..eb50688 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-06-10  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 536158 – also bump GHashTable version when a node is removed via
+       g_hash_table_iter_remove()/g_hash_table_iter_steal()
+
+       * glib/ghash.c (iter_remove_or_steal): Bump the hash table 
+       version. Patch by Jean-Yves Lefort
+
 2008-06-07  Tor Lillqvist  <tml@novell.com>
 
        * glib/gstdio.c (g_access): Define X_OK if necessary (MSVC).
index af81f5a..e00b4c4 100644 (file)
@@ -530,6 +530,11 @@ iter_remove_or_steal (RealIter *ri, gboolean notify)
   g_slice_free (GHashNode, node);
 
   ri->hash_table->nnodes--;
+
+#ifndef G_DISABLE_ASSERT
+  ri->version++;
+  ri->hash_table->version++;
+#endif
 }
 
 /**