Remove definition of g_hash_table_freeze and g_hash_table_thaw. Instead
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>
Thu, 19 Apr 2001 13:33:31 +0000 (13:33 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Thu, 19 Apr 2001 13:33:31 +0000 (13:33 +0000)
2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
macros to ghash.h to go along the lines of the standard.

* gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
and g_scanner_thaw_symbol_table.

* gutils.c, gutils.h: Dito for g_dirname. g_basename is still
defined in gutils.c, but declared ing gutils.h only
G_DISABLE_DEPRECATED-guarded.

20 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
ghash.c
ghash.h
glib/ghash.c
glib/ghash.h
glib/gscanner.c
glib/gscanner.h
glib/gutils.c
glib/gutils.h
gscanner.c
gscanner.h
gutils.c
gutils.h

index 05717d9..2caf04f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
index 05717d9..2caf04f 100644 (file)
@@ -1,5 +1,16 @@
 2001-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
+       g_hash_table_thaw. Instead added G_DISABLE_DEPRECATED-guarded
+       macros to ghash.h to go along the lines of the standard.
+
+       * gscanner.c, gscanner.h: Dito for g_scanner_freeze_symbol_table
+       and g_scanner_thaw_symbol_table.
+
+       * gutils.c, gutils.h: Dito for g_dirname. g_basename is still
+       defined in gutils.c, but declared ing gutils.h only
+       G_DISABLE_DEPRECATED-guarded.
+       
        * configure.in: Removed bashism in test for the pkg-config
        version.
 
diff --git a/ghash.c b/ghash.c
index 3c6bc99..a5ebeea 100644 (file)
--- a/ghash.c
+++ b/ghash.c
@@ -564,39 +564,6 @@ g_hash_table_size (GHashTable *hash_table)
   return hash_table->nnodes;
 }
 
-/**
- * g_hash_table_freeze:
- * @hash_table: a #GHashTable.
- * 
- * This function is deprecated and will be removed in the next major
- * release of GLib. It does nothing.
- **/
-void
-g_hash_table_freeze (GHashTable *hash_table)
-{
-#ifdef G_ENABLE_DEBUG
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_warning("g_hash_table_freeze and g_hash_table_thaw are deprecated.");
-      first_call = FALSE;
-    }
-#endif /* G_ENABLE_DEBUG */
-}
-
-/**
- * g_hash_table_thaw:
- * @hash_table: a #GHashTable.
- * 
- * This function is deprecated and will be removed in the next major
- * release of GLib. It does nothing.
- **/
-void
-g_hash_table_thaw (GHashTable *hash_table)
-{
-}
-
 static void
 g_hash_table_resize (GHashTable *hash_table)
 {
diff --git a/ghash.h b/ghash.h
index f85522a..a9af5dc 100644 (file)
--- a/ghash.h
+++ b/ghash.h
@@ -73,10 +73,14 @@ guint           g_hash_table_foreach_steal     (GHashTable     *hash_table,
                                            gpointer        user_data);
 guint      g_hash_table_size              (GHashTable     *hash_table);
 
+#ifndef G_DISABLE_DEPRECATED
+
 /* The following two functions are deprecated and will be removed in
  * the next major release. They do no good. */
-void       g_hash_table_freeze            (GHashTable     *hash_table);
-void       g_hash_table_thaw              (GHashTable     *hash_table);
+#define g_hash_table_freeze(hash_table) ((void)0)
+#define g_hash_table_thaw(hash_table) ((void)0)
+
+#endif /* G_DISABLE_DEPRECATED */
 
 /* Hash Functions
  */
index 3c6bc99..a5ebeea 100644 (file)
@@ -564,39 +564,6 @@ g_hash_table_size (GHashTable *hash_table)
   return hash_table->nnodes;
 }
 
-/**
- * g_hash_table_freeze:
- * @hash_table: a #GHashTable.
- * 
- * This function is deprecated and will be removed in the next major
- * release of GLib. It does nothing.
- **/
-void
-g_hash_table_freeze (GHashTable *hash_table)
-{
-#ifdef G_ENABLE_DEBUG
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_warning("g_hash_table_freeze and g_hash_table_thaw are deprecated.");
-      first_call = FALSE;
-    }
-#endif /* G_ENABLE_DEBUG */
-}
-
-/**
- * g_hash_table_thaw:
- * @hash_table: a #GHashTable.
- * 
- * This function is deprecated and will be removed in the next major
- * release of GLib. It does nothing.
- **/
-void
-g_hash_table_thaw (GHashTable *hash_table)
-{
-}
-
 static void
 g_hash_table_resize (GHashTable *hash_table)
 {
index f85522a..a9af5dc 100644 (file)
@@ -73,10 +73,14 @@ guint           g_hash_table_foreach_steal     (GHashTable     *hash_table,
                                            gpointer        user_data);
 guint      g_hash_table_size              (GHashTable     *hash_table);
 
+#ifndef G_DISABLE_DEPRECATED
+
 /* The following two functions are deprecated and will be removed in
  * the next major release. They do no good. */
-void       g_hash_table_freeze            (GHashTable     *hash_table);
-void       g_hash_table_thaw              (GHashTable     *hash_table);
+#define g_hash_table_freeze(hash_table) ((void)0)
+#define g_hash_table_thaw(hash_table) ((void)0)
+
+#endif /* G_DISABLE_DEPRECATED */
 
 /* Hash Functions
  */
index cf73a04..f770dd5 100644 (file)
@@ -563,27 +563,6 @@ g_scanner_scope_foreach_symbol (GScanner       *scanner,
   g_hash_table_foreach (scanner->symbol_table, g_scanner_foreach_internal, d);
 }
 
-void
-g_scanner_freeze_symbol_table (GScanner *scanner)
-{
-#ifdef G_ENABLE_DEBUG
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_message ("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_scanner_freeze_symbol_table (scanner);
-}
-
 GTokenType
 g_scanner_peek_next_token (GScanner    *scanner)
 {
index 4b9a07c..d71bbde 100644 (file)
@@ -256,10 +256,14 @@ gint              g_scanner_stat_mode             (const gchar    *filename);
   g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \
 } G_STMT_END
 
+#ifndef G_DISABLE_DEPRECATED
+
 /* The following two functions are deprecated and will be removed in
  * the next major release. They do no good. */
-void           g_scanner_freeze_symbol_table   (GScanner       *scanner);
-void           g_scanner_thaw_symbol_table     (GScanner       *scanner);
+#define g_scanner_freeze_symbol_table(scanner) ((void)0)
+#define g_scanner_thaw_symbol_table(scanner) ((void)0)
+
+#endif /* G_DISABLE_DEPRECATED */
 
 G_END_DECLS
 
index da35b73..f00262c 100644 (file)
@@ -470,17 +470,6 @@ G_CONST_RETURN gchar*
 g_basename (const gchar           *file_name)
 {
   register gchar *base;
-#if defined(G_ENABLE_DEBUG) && !defined(G_OS_WIN32)
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_message ("g_basename is deprecated. Use g_path_get_basename instead. "
-                "Beware that the string returned by g_path_get_basename() has "
-                " to be g_free()ed.");
-      first_call = FALSE;
-    }
-#endif /* G_ENABLE_DEBUG */
   
   g_return_val_if_fail (file_name != NULL, NULL);
   
@@ -629,22 +618,6 @@ g_path_get_dirname (const gchar       *file_name)
 }
 
 gchar*
-g_dirname (const gchar    *file_name)
-{
-#if defined(G_ENABLE_DEBUG) && !defined(G_OS_WIN32)
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_message ("g_dirname() is deprecated. Use g_path_get_dirname() instead.");
-      first_call = FALSE;
-    }
-#endif /* G_ENABLE_DEBUG */
-
-  return g_path_get_dirname (file_name);
-}
-
-gchar*
 g_get_current_dir (void)
 {
   gchar *buffer = NULL;
index f9a7b52..3e3d30f 100644 (file)
@@ -149,12 +149,16 @@ gboolean              g_path_is_absolute   (const gchar *file_name);
 /* In case of absolute paths, skip the root part */
 G_CONST_RETURN gchar* g_path_skip_root     (const gchar *file_name);
 
+#ifndef G_DISABLE_DEPRECATED
+
 /* These two functions are deprecated and will be removed in the next
  * major release of GLib. Use g_path_get_dirname/g_path_get_basename
  * instead. Whatch out! The string returned by g_path_get_basename
  * must be g_freed, while the string returned by g_basename must not.*/
 G_CONST_RETURN gchar* g_basename           (const gchar *file_name);
-gchar*                g_dirname            (const gchar *file_name);
+#define g_dirname g_path_get_dirname
+
+#endif /* G_DISABLE_DEPRECATED */
 
 /* The returned strings are newly allocated with g_malloc() */
 gchar*                g_get_current_dir    (void);
index cf73a04..f770dd5 100644 (file)
@@ -563,27 +563,6 @@ g_scanner_scope_foreach_symbol (GScanner       *scanner,
   g_hash_table_foreach (scanner->symbol_table, g_scanner_foreach_internal, d);
 }
 
-void
-g_scanner_freeze_symbol_table (GScanner *scanner)
-{
-#ifdef G_ENABLE_DEBUG
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_message ("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_scanner_freeze_symbol_table (scanner);
-}
-
 GTokenType
 g_scanner_peek_next_token (GScanner    *scanner)
 {
index 4b9a07c..d71bbde 100644 (file)
@@ -256,10 +256,14 @@ gint              g_scanner_stat_mode             (const gchar    *filename);
   g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \
 } G_STMT_END
 
+#ifndef G_DISABLE_DEPRECATED
+
 /* The following two functions are deprecated and will be removed in
  * the next major release. They do no good. */
-void           g_scanner_freeze_symbol_table   (GScanner       *scanner);
-void           g_scanner_thaw_symbol_table     (GScanner       *scanner);
+#define g_scanner_freeze_symbol_table(scanner) ((void)0)
+#define g_scanner_thaw_symbol_table(scanner) ((void)0)
+
+#endif /* G_DISABLE_DEPRECATED */
 
 G_END_DECLS
 
index da35b73..f00262c 100644 (file)
--- a/gutils.c
+++ b/gutils.c
@@ -470,17 +470,6 @@ G_CONST_RETURN gchar*
 g_basename (const gchar           *file_name)
 {
   register gchar *base;
-#if defined(G_ENABLE_DEBUG) && !defined(G_OS_WIN32)
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_message ("g_basename is deprecated. Use g_path_get_basename instead. "
-                "Beware that the string returned by g_path_get_basename() has "
-                " to be g_free()ed.");
-      first_call = FALSE;
-    }
-#endif /* G_ENABLE_DEBUG */
   
   g_return_val_if_fail (file_name != NULL, NULL);
   
@@ -629,22 +618,6 @@ g_path_get_dirname (const gchar       *file_name)
 }
 
 gchar*
-g_dirname (const gchar    *file_name)
-{
-#if defined(G_ENABLE_DEBUG) && !defined(G_OS_WIN32)
-  static gboolean first_call = TRUE;
-
-  if (first_call)
-    {
-      g_message ("g_dirname() is deprecated. Use g_path_get_dirname() instead.");
-      first_call = FALSE;
-    }
-#endif /* G_ENABLE_DEBUG */
-
-  return g_path_get_dirname (file_name);
-}
-
-gchar*
 g_get_current_dir (void)
 {
   gchar *buffer = NULL;
index f9a7b52..3e3d30f 100644 (file)
--- a/gutils.h
+++ b/gutils.h
@@ -149,12 +149,16 @@ gboolean              g_path_is_absolute   (const gchar *file_name);
 /* In case of absolute paths, skip the root part */
 G_CONST_RETURN gchar* g_path_skip_root     (const gchar *file_name);
 
+#ifndef G_DISABLE_DEPRECATED
+
 /* These two functions are deprecated and will be removed in the next
  * major release of GLib. Use g_path_get_dirname/g_path_get_basename
  * instead. Whatch out! The string returned by g_path_get_basename
  * must be g_freed, while the string returned by g_basename must not.*/
 G_CONST_RETURN gchar* g_basename           (const gchar *file_name);
-gchar*                g_dirname            (const gchar *file_name);
+#define g_dirname g_path_get_dirname
+
+#endif /* G_DISABLE_DEPRECATED */
 
 /* The returned strings are newly allocated with g_malloc() */
 gchar*                g_get_current_dir    (void);