Patch from Josh Pritikin to fix reversed key and value destroy functions.

Thu Aug 23 11:09:58 2001  Owen Taylor  <otaylor@redhat.com>

        * glib/ghash.c (g_hash_table_foreach_remove_or_steal):
        Patch from Josh Pritikin to fix reversed key and value destroy
        functions. (#59433)

        * glib/giochannel.h (struct _GIOChannel): Mark structure
        /*< private >*/
This commit is contained in:
Owen Taylor 2001-08-23 15:24:35 +00:00 committed by Owen Taylor
parent 3b6fd34af7
commit faca80d619
11 changed files with 95 additions and 5 deletions

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -1,3 +1,12 @@
Thu Aug 23 11:09:58 2001 Owen Taylor <otaylor@redhat.com>
* glib/ghash.c (g_hash_table_foreach_remove_or_steal):
Patch from Josh Pritikin to fix reversed key and value destroy
functions. (#59433)
* glib/giochannel.h (struct _GIOChannel): Mark structure
/*< private >*/
Thu Aug 23 16:14:17 2001 Tim Janik <timj@gtk.org>
* glib/gmacros.h (G_GNUC_NO_INSTRUMENT): new macro.

View File

@ -77,7 +77,6 @@ A data structure representing an IO Channel. The fields should be considered
private and should only be accessed with the following functions.
</para>
@close_on_unref:
<!-- ##### FUNCTION g_io_channel_unix_new ##### -->
<para>
@ -584,6 +583,24 @@ generic way.
@Returns:
<!-- ##### FUNCTION g_io_channel_get_close_on_unref ##### -->
<para>
</para>
@channel:
@Returns:
<!-- ##### FUNCTION g_io_channel_set_close_on_unref ##### -->
<para>
</para>
@channel:
@do_close:
<!-- ##### FUNCTION g_io_channel_read ##### -->
<para>
</para>

View File

@ -509,16 +509,16 @@ g_hash_table_foreach_remove_or_steal (GHashTable *hash_table,
{
prev->next = node->next;
g_hash_node_destroy (node,
notify ? hash_table->value_destroy_func : NULL,
notify ? hash_table->key_destroy_func : NULL);
notify ? hash_table->key_destroy_func : NULL,
notify ? hash_table->value_destroy_func : NULL);
node = prev;
}
else
{
hash_table->nodes[i] = node->next;
g_hash_node_destroy (node,
notify ? hash_table->value_destroy_func : NULL,
notify ? hash_table->key_destroy_func : NULL);
notify ? hash_table->key_destroy_func : NULL,
notify ? hash_table->value_destroy_func : NULL);
goto restart;
}
}

View File

@ -103,6 +103,7 @@ typedef enum
struct _GIOChannel
{
/*< private >*/
guint ref_count;
GIOFuncs *funcs;