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.
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.
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.
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.
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.
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.
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.
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.
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)
{
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
*/
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)
{
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
*/
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)
{
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
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);
}
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;
/* 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);
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)
{
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
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);
}
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;
/* 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);