summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@src.gnome.org>1998-03-10 01:07:16 +0000
committerTim Janik <timj@src.gnome.org>1998-03-10 01:07:16 +0000
commit2ab3ec6cbd3d40be95d262e03aa8d8cab353b9a4 (patch)
tree59e7f228c3d6c0bfed2b5d42f8017565f9096606
parentd187183161156de7373e6b46e05be0135c8caef4 (diff)
downloadgtk+-2ab3ec6cbd3d40be95d262e03aa8d8cab353b9a4.tar.gz
applied gtk-gronlund-980309-0.patch.gz.
-timj
-rw-r--r--glib/ChangeLog6
-rw-r--r--glib/gscanner.c11
2 files changed, 17 insertions, 0 deletions
diff --git a/glib/ChangeLog b/glib/ChangeLog
index 04abfdaf02..5519af0c13 100644
--- a/glib/ChangeLog
+++ b/glib/ChangeLog
@@ -1,3 +1,9 @@
+Tue Mar 10 02:03:12 1998 Tim Janik <timj@gimp.org>
+
+ * gscanner.c (g_scanner_destroy_symbol_table_entry): new function to
+ free symbol table entries upon destruction
+ (gtk-gronlund-980309-0.patch.gz).
+
Mon Mar 9 15:02:21 1998 Tim Janik <timj@gimp.org>
* glib.h: changed *_length functions to return guint.
diff --git a/glib/gscanner.c b/glib/gscanner.c
index ca0df4eccc..662cf16338 100644
--- a/glib/gscanner.c
+++ b/glib/gscanner.c
@@ -200,11 +200,22 @@ g_scanner_new (GScannerConfig *config_templ)
return scanner;
}
+static void
+g_scanner_destroy_symbol_table_entry (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ g_free (key);
+ g_free (value);
+}
+
void
g_scanner_destroy (GScanner *scanner)
{
g_return_if_fail (scanner != NULL);
+ g_hash_table_foreach (scanner->symbol_table,
+ g_scanner_destroy_symbol_table_entry, NULL);
g_hash_table_destroy (scanner->symbol_table);
g_scanner_free_value (&scanner->token, &scanner->value);
g_scanner_free_value (&scanner->next_token, &scanner->next_value);