From: Sebastian Wilhelmi Date: Thu, 19 Apr 2001 13:33:31 +0000 (+0000) Subject: Remove definition of g_hash_table_freeze and g_hash_table_thaw. Instead X-Git-Tag: GLIB_1_3_5~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d52e5cd5cf780c3bccbf63a97795fc4982c04638;p=platform%2Fupstream%2Fglib.git Remove definition of g_hash_table_freeze and g_hash_table_thaw. Instead 2001-04-19 Sebastian Wilhelmi * 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. --- diff --git a/ChangeLog b/ChangeLog index 05717d9..2caf04f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 05717d9..2caf04f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,16 @@ 2001-04-19 Sebastian Wilhelmi + * 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 --- 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 --- 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 */ diff --git a/glib/ghash.c b/glib/ghash.c index 3c6bc99..a5ebeea 100644 --- a/glib/ghash.c +++ b/glib/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/glib/ghash.h b/glib/ghash.h index f85522a..a9af5dc 100644 --- a/glib/ghash.h +++ b/glib/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 */ diff --git a/glib/gscanner.c b/glib/gscanner.c index cf73a04..f770dd5 100644 --- a/glib/gscanner.c +++ b/glib/gscanner.c @@ -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) { diff --git a/glib/gscanner.h b/glib/gscanner.h index 4b9a07c..d71bbde 100644 --- a/glib/gscanner.h +++ b/glib/gscanner.h @@ -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 diff --git a/glib/gutils.c b/glib/gutils.c index da35b73..f00262c 100644 --- a/glib/gutils.c +++ b/glib/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; diff --git a/glib/gutils.h b/glib/gutils.h index f9a7b52..3e3d30f 100644 --- a/glib/gutils.h +++ b/glib/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); diff --git a/gscanner.c b/gscanner.c index cf73a04..f770dd5 100644 --- a/gscanner.c +++ b/gscanner.c @@ -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) { diff --git a/gscanner.h b/gscanner.h index 4b9a07c..d71bbde 100644 --- a/gscanner.h +++ b/gscanner.h @@ -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 diff --git a/gutils.c b/gutils.c index da35b73..f00262c 100644 --- 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; diff --git a/gutils.h b/gutils.h index f9a7b52..3e3d30f 100644 --- 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);