mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
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:
parent
3a14f25fdf
commit
e666e8125f
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
10
ghash.c
@ -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
|
||||
|
10
glib/ghash.c
10
glib/ghash.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user