summaryrefslogtreecommitdiff
path: root/gscanner.c
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2000-07-20 16:06:33 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2000-07-20 16:06:33 +0000
commit84114c5321e4d7e4701f77f7f0e2b9b739d4035c (patch)
treeb678c8e9b40afdcf58a322a0e9222d9861ea6f09 /gscanner.c
parent5e4c5611ab37edf414239eb44f9765c2b678e9c4 (diff)
downloadglib-84114c5321e4d7e4701f77f7f0e2b9b739d4035c.tar.gz
Mark the functions g_hash_table_freeze, g_hash_table_thaw and thus
2000-07-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * ghash.c, gscanner.c, glib.h: Mark the functions g_hash_table_freeze, g_hash_table_thaw and thus g_scanner_freeze_symbol_table and g_scanner_thaw_symbol_table deprecated. They will issue an warning once, when compiled with G_ENABLE_DEBUG. This fixes Bug #3883. For discussion see http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html
Diffstat (limited to 'gscanner.c')
-rw-r--r--gscanner.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gscanner.c b/gscanner.c
index 55c311dd2..cbc2e1e41 100644
--- a/gscanner.c
+++ b/gscanner.c
@@ -565,17 +565,21 @@ g_scanner_scope_foreach_symbol (GScanner *scanner,
void
g_scanner_freeze_symbol_table (GScanner *scanner)
{
- g_return_if_fail (scanner != NULL);
-
- g_hash_table_freeze (scanner->symbol_table);
+#ifdef G_ENABLE_DEBUG
+ static gboolean first_call = TRUE;
+
+ if (first_call)
+ {
+ g_warning("g_scanner_freeze_symbol_table and "
+ "g_scanner_thaw_symbol_table are deprecated.");
+ first_call = FALSE;
+ }
+#endif /* G_ENABLE_DEBUG */
}
void
g_scanner_thaw_symbol_table (GScanner *scanner)
{
- g_return_if_fail (scanner != NULL);
-
- g_hash_table_thaw (scanner->symbol_table);
}
GTokenType