From ed3b351c49cb4fbd48105a89eb26a31d057e2e2b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 30 Jun 2008 22:19:07 +0000 Subject: [PATCH] =?UTF-8?q?=20=20=20=20=20=20=20=20Bug=20536158=20?= =?UTF-8?q?=E2=80=93=20also=20bump=20GHashTable=20version=20when=20a=20nod?= =?UTF-8?q?e=20is=20removed=20via=20=20=20=20=20=20=20=20=20g=5Fhash=5Ftab?= =?UTF-8?q?le=5Fiter=5Fremove()/g=5Fhash=5Ftable=5Fiter=5Fsteal()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * glib/ghash.c (iter_remove_or_steal): Bump the hash table version. Patch by Jean-Yves Lefort svn path=/branches/glib-2-16/; revision=7112 --- ChangeLog | 10 ++++++++++ glib/ghash.c | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 763d27592..e867c726b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-06-30 Matthias Clasen + + Backport from trunk: + + 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-30 Matthias Clasen Backport from trunk: diff --git a/glib/ghash.c b/glib/ghash.c index af81f5acc..e00b4c4cc 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -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 } /**