applied gtk-gronlund-980309-0.patch.gz.

-timj
This commit is contained in:
Tim Janik 1998-03-10 01:07:16 +00:00
parent d187183161
commit 2ab3ec6cbd
2 changed files with 17 additions and 0 deletions

View File

@ -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.

View File

@ -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);