implemented incremental freezing facility.

Sat Nov 28 01:23:25 1998  Tim Janik  <timj@gtk.org>

        * ghash.c: implemented incremental freezing facility.
This commit is contained in:
Tim Janik 1998-11-28 01:54:54 +00:00 committed by Tim Janik
parent 3a14f25fdf
commit e666e8125f
10 changed files with 42 additions and 10 deletions

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

View File

@ -1,3 +1,7 @@
Sat Nov 28 01:23:25 1998 Tim Janik <timj@gtk.org>
* ghash.c: implemented incremental freezing facility.
Thu Nov 26 01:36:20 1998 Tim Janik <timj@gtk.org>
* glib.h:

10
ghash.c
View File

@ -36,7 +36,7 @@ struct _GHashTable
{
gint size;
gint nnodes;
gint frozen;
guint frozen;
GHashNode **nodes;
GHashFunc hash_func;
GCompareFunc key_compare_func;
@ -207,7 +207,7 @@ g_hash_table_freeze (GHashTable *hash_table)
{
g_return_if_fail (hash_table != NULL);
hash_table->frozen = TRUE;
hash_table->frozen++;
}
void
@ -215,9 +215,9 @@ g_hash_table_thaw (GHashTable *hash_table)
{
g_return_if_fail (hash_table != NULL);
hash_table->frozen = FALSE;
g_hash_table_resize (hash_table);
if (hash_table->frozen)
if (!(--hash_table->frozen))
g_hash_table_resize (hash_table);
}
gint

View File

@ -36,7 +36,7 @@ struct _GHashTable
{
gint size;
gint nnodes;
gint frozen;
guint frozen;
GHashNode **nodes;
GHashFunc hash_func;
GCompareFunc key_compare_func;
@ -207,7 +207,7 @@ g_hash_table_freeze (GHashTable *hash_table)
{
g_return_if_fail (hash_table != NULL);
hash_table->frozen = TRUE;
hash_table->frozen++;
}
void
@ -215,9 +215,9 @@ g_hash_table_thaw (GHashTable *hash_table)
{
g_return_if_fail (hash_table != NULL);
hash_table->frozen = FALSE;
g_hash_table_resize (hash_table);
if (hash_table->frozen)
if (!(--hash_table->frozen))
g_hash_table_resize (hash_table);
}
gint